♻️(frontend) adapt modals to ModalDefaultVariantProps

cunningham-react 4.3.0 splits Modal props per variant. Switch
AlertModal and SideModal from the now-removed ModalProps alias to
the more precise ModalDefaultVariantProps type so the modal
wrappers keep type-checking against the new API.

Signed-off-by: Nathan Panchout <nathanpanchout@hotmail.com>
This commit is contained in:
Nathan Panchout
2026-05-25 10:12:01 +02:00
parent 5146765469
commit 39937a3436
@@ -1,5 +1,9 @@
import { Modal, ModalSize } from '@gouvfr-lasuite/cunningham-react';
import { ComponentPropsWithRef, PropsWithChildren } from 'react';
import {
Modal,
ModalDefaultVariantProps,
ModalSize,
} from '@gouvfr-lasuite/cunningham-react';
import { PropsWithChildren } from 'react';
import { createGlobalStyle } from 'styled-components';
interface SideModalStyleProps {
@@ -35,7 +39,7 @@ const SideModalStyle = createGlobalStyle<SideModalStyleProps>`
}
`;
type SideModalType = Omit<ComponentPropsWithRef<typeof Modal>, 'size'>;
type SideModalType = Omit<ModalDefaultVariantProps, 'size'>;
type SideModalProps = SideModalType & Partial<SideModalStyleProps>;