Skip to content

Commit 164ed88

Browse files
committed
🎨(frontend) improve interface SideModal
Improve the interface of the SideModal component. Set the width and the side by default.
1 parent f5a35c6 commit 164ed88

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/frontend/apps/impress/src/components/SideModal.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ const SideModalStyle = createGlobalStyle<SideModalStyleProps>`
2222

2323
type SideModalType = Omit<ComponentPropsWithRef<typeof Modal>, 'size'>;
2424

25-
interface SideModalProps extends SideModalType {
26-
side: 'left' | 'right';
27-
width: string;
28-
}
25+
type SideModalProps = SideModalType & Partial<SideModalStyleProps>;
2926

3027
export const SideModal = ({
3128
children,
32-
side,
33-
width,
29+
side = 'right',
30+
width = '35vw',
3431
...modalProps
3532
}: PropsWithChildren<SideModalProps>) => {
3633
return (

0 commit comments

Comments
 (0)