🎨(frontend) improve interface SideModal
Improve the interface of the SideModal component. Set the width and the side by default.
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user