diff --git a/packages/integration/src/components/Gaufre.tsx b/packages/integration/src/components/Gaufre.tsx index 2988847..2277477 100644 --- a/packages/integration/src/components/Gaufre.tsx +++ b/packages/integration/src/components/Gaufre.tsx @@ -1,11 +1,27 @@ import { useTranslate } from "../i18n/useTranslate" -export const Gaufre = () => { +export type Props = { + /** + * Variantes d'affichage : + * + * "responsive": Affiche un bouton plus petit sur écran mobile/tablette, plus grand sur écran plus large. + * "small": Affiche un bouton plus petit. + */ + variant?: "responsive" | "small" +} + +const variantClasses = { + responsive: "lasuite-gaufre-btn--responsive", + small: "lasuite-gaufre-btn--small", +} + +export const Gaufre = ({ variant }: Props) => { const { t } = useTranslate() + const variantClass = !!variant ? variantClasses[variant] : "" return ( +
}) => {
+ ) } diff --git a/packages/integration/src/dev/dev.tsx b/packages/integration/src/dev/dev.tsx index 2783e9f..b20384f 100644 --- a/packages/integration/src/dev/dev.tsx +++ b/packages/integration/src/dev/dev.tsx @@ -115,7 +115,7 @@ const routes = [ label: "Gaufre (header DSFR)", component: ( - ]} /> +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac diam a libero posuere @@ -157,7 +157,6 @@ const routes = [