🎨(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'>;
interface SideModalProps extends SideModalType {
side: 'left' | 'right';
width: string;
}
type SideModalProps = SideModalType & Partial<SideModalStyleProps>;
export const SideModal = ({
children,
side,
width,
side = 'right',
width = '35vw',
...modalProps
}: PropsWithChildren<SideModalProps>) => {
return (