From 164ed885caa5fe56553a8a8b878517f56c7aeecd Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Tue, 9 Jul 2024 11:54:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8(frontend)=20improve=20interface=20?= =?UTF-8?q?SideModal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve the interface of the SideModal component. Set the width and the side by default. --- src/frontend/apps/impress/src/components/SideModal.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/frontend/apps/impress/src/components/SideModal.tsx b/src/frontend/apps/impress/src/components/SideModal.tsx index 217088e3..249dd66a 100644 --- a/src/frontend/apps/impress/src/components/SideModal.tsx +++ b/src/frontend/apps/impress/src/components/SideModal.tsx @@ -22,15 +22,12 @@ const SideModalStyle = createGlobalStyle` type SideModalType = Omit, 'size'>; -interface SideModalProps extends SideModalType { - side: 'left' | 'right'; - width: string; -} +type SideModalProps = SideModalType & Partial; export const SideModal = ({ children, - side, - width, + side = 'right', + width = '35vw', ...modalProps }: PropsWithChildren) => { return (