🎨(frontend) improve interface SideModal

Improve the interface of the SideModal
component.
Set the width and the side by default.
This commit is contained in:
Anthony LC
2024-07-09 11:54:38 +02:00
committed by Anthony LC
parent f5a35c66bb
commit 164ed885ca

View File

@@ -22,15 +22,12 @@ const SideModalStyle = createGlobalStyle<SideModalStyleProps>`
type SideModalType = Omit<ComponentPropsWithRef<typeof Modal>, 'size'>; type SideModalType = Omit<ComponentPropsWithRef<typeof Modal>, 'size'>;
interface SideModalProps extends SideModalType { type SideModalProps = SideModalType & Partial<SideModalStyleProps>;
side: 'left' | 'right';
width: string;
}
export const SideModal = ({ export const SideModal = ({
children, children,
side, side = 'right',
width, width = '35vw',
...modalProps ...modalProps
}: PropsWithChildren<SideModalProps>) => { }: PropsWithChildren<SideModalProps>) => {
return ( return (