diff --git a/src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx b/src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx index 3268e83be..fd1299663 100644 --- a/src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx +++ b/src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx @@ -1,5 +1,5 @@ import { Button } from '@gouvfr-lasuite/ui-components'; -import { ReactNode } from 'react'; +import { type ComponentProps } from 'react'; import { useTranslation } from 'react-i18next'; import { css } from 'styled-components'; @@ -10,20 +10,15 @@ import { LOGIN_URL } from '../conf'; import { useAuth } from '../hooks'; import { gotoLogin } from '../utils'; -type ButtonLoginProps = { - href?: string; - variant?: 'primary' | 'tertiary'; - children?: ReactNode; -}; +type ButtonLoginProps = ComponentProps; export const ButtonLogin = ({ href = LOGIN_URL, - variant = 'primary', children, + ...props }: ButtonLoginProps) => { const { t } = useTranslation(); const { authenticated } = useAuth(); - const label = children ?? t('Sign in'); if (authenticated) { return null; @@ -31,14 +26,14 @@ export const ButtonLogin = ({ return ( ); };