Improve sidebar, new chat, and share dialog (#190)
This commit is contained in:
parent
35e83dc87e
commit
be90a40427
23 changed files with 598 additions and 217 deletions
28
components/sidebar-mobile.tsx
Normal file
28
components/sidebar-mobile.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
'use client'
|
||||
|
||||
import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'
|
||||
|
||||
import { Sidebar } from '@/components/sidebar'
|
||||
import { Button } from '@/components/ui/button'
|
||||
|
||||
import { IconSidebar } from '@/components/ui/icons'
|
||||
|
||||
interface SidebarMobileProps {
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export function SidebarMobile({ children }: SidebarMobileProps) {
|
||||
return (
|
||||
<Sheet>
|
||||
<SheetTrigger asChild>
|
||||
<Button variant="ghost" className="-ml-2 flex h-9 w-9 p-0 lg:hidden">
|
||||
<IconSidebar className="h-6 w-6" />
|
||||
<span className="sr-only">Toggle Sidebar</span>
|
||||
</Button>
|
||||
</SheetTrigger>
|
||||
<SheetContent className="inset-y-0 flex h-auto w-[300px] flex-col p-0">
|
||||
<Sidebar className="flex">{children}</Sidebar>
|
||||
</SheetContent>
|
||||
</Sheet>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue