Skip to content

Commit

Permalink
fix: add className attribute in Drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
yougyung committed Apr 26, 2024
1 parent dc23a2b commit 2d2df65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function ResultCategoryDetailDialog({ children, querystring }: Re
return (
<>
<Responsive maxWidth={767}>
<Drawer drawerKey={DIALOG_KEY.RESULT_CATEGORY} closeDialog={handleCloseDialog}>
<Drawer drawerKey={DIALOG_KEY.RESULT_CATEGORY} closeDialog={handleCloseDialog} className="h-[90vh]">
{children}
</Drawer>
</Responsive>
Expand Down
6 changes: 4 additions & 2 deletions app/ui/view/molecule/drawer/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import useDialog from '@/app/hooks/useDialog';
interface DrawerProps extends React.PropsWithChildren {
drawerKey: DialogKey;
closeDialog?: () => void;
className?: string;
}

const Drawer = ({ children, drawerKey, closeDialog }: DrawerProps) => {
const Drawer = ({ children, drawerKey, closeDialog, className }: DrawerProps) => {
const { isOpen, close } = useDialog(drawerKey, closeDialog);

return (
Expand All @@ -20,7 +21,8 @@ const Drawer = ({ children, drawerKey, closeDialog }: DrawerProps) => {
<DrawerPrimitive.Overlay className="fixed inset-0 z-50 bg-black/60" />
<DrawerPrimitive.Content
className={cn(
'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-[90vh] flex-col rounded-t-[10px] border border-slate-200 bg-white',
'fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-[10px] border border-slate-200 bg-white',
className,
)}
>
{children}
Expand Down

0 comments on commit 2d2df65

Please sign in to comment.