🎨(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'>;
|
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 (
|
||||||
|
|||||||
Reference in New Issue
Block a user