Skip to content

Commit

Permalink
update menuOption component, add SheetContent.
Browse files Browse the repository at this point in the history
  • Loading branch information
yashdev9274 committed May 22, 2024
1 parent 0508ee1 commit 1c4c153
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/(main)/agency/[agencyId]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const layout = async ({ children, params }: Props) => {
type="agency"
/>
<div className='md:pl-[300px]'>

{children}
</div>
</div>
)
Expand Down
35 changes: 34 additions & 1 deletion src/components/sidebar/menu-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import {
SubAccountSidebarOption,
} from '@prisma/client'
import { useEffect, useMemo, useState } from 'react'
import { Sheet, SheetContent, SheetTrigger } from '../ui/sheet'
import { Button } from '../ui/button'
import { Menu } from 'lucide-react'
import clsx from 'clsx'

type Props = {

Expand Down Expand Up @@ -44,7 +48,36 @@ const MenuOptions = ({
if (!isMounted) return

return (
<div>MenuOptions</div>
<Sheet
modal={false}
{...openState}
>
<SheetTrigger
asChild
className="absolute left-4 top-4 z-[100] md:!hidden felx"
>
<Button
variant="outline"
size={'icon'}
>
<Menu />
</Button>
</SheetTrigger>

<SheetContent
showX={!defaultOpen}
side={'left'}
className={clsx(
'bg-background/80 backdrop-blur-xl fixed top-0 border-r-[1px] p-6',
{
'hidden md:inline-block z-0 w-[300px]': defaultOpen,
'inline-block md:hidden z-[100] w-full': !defaultOpen,
}
)}
>

</SheetContent>
</Sheet>
)
}
export default MenuOptions;

0 comments on commit 1c4c153

Please sign in to comment.