Skip to content

Commit

Permalink
Added new design variation to the Drawer component
Browse files Browse the repository at this point in the history
  • Loading branch information
jaieds committed Dec 31, 2024
1 parent b7c481a commit daea79b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/drawer/drawer-body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const DrawerBody = ( { children, className, ...props }: DrawerBodyProps ) => {
return (
<div
className={ cn(
'px-5 flex flex-col flex-1 overflow-y-auto overflow-x-hidden',
'px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden',
className
) }
{ ...props }
Expand Down
3 changes: 2 additions & 1 deletion src/components/drawer/drawer-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ const DrawerFooter = ( { children, className }: DrawerFooterProps ) => {
return (
<div
className={ cn(
'p-5 flex justify-end gap-3 mt-auto',
'px-5 py-4 flex justify-end gap-3 mt-auto',
{
'bg-background-secondary': design === 'footer-divided',
'border-t border-solid border-border-subtle': design === 'footer-bordered',
},
className
) }
Expand Down
2 changes: 1 addition & 1 deletion src/components/drawer/drawer-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface DrawerHeaderProps {
// Drawer header wrapper.
const DrawerHeader = ( { children, className, ...props }: DrawerHeaderProps ) => {
return (
<div className={ cn( 'space-y-2 px-5 pt-5 pb-1', className ) } { ...props }>
<div className={ cn( 'space-y-2 px-5 pt-5 pb-4', className ) } { ...props }>
{ children }
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/drawer/drawer-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const DrawerPanel = ( { children, className }: DrawerPanelProps ) => {
<motion.div
ref={ drawerRef }
className={ cn(
'flex flex-col gap-5 w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden',
'flex flex-col w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden',
className
) }
initial="exit"
Expand Down
2 changes: 1 addition & 1 deletion src/components/drawer/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface DrawerProps {
/** Close drawer when pressing the escape key. */
exitOnEsc?: boolean;
/** Design of the drawer. */
design?: 'simple' | 'footer-divided';
design?: 'simple' | 'footer-divided' | 'footer-bordered';
/** Position of the drawer. */
position?: 'left' | 'right';
/** Duration of the drawer transition. */
Expand Down

0 comments on commit daea79b

Please sign in to comment.