vision-agent / components /sidebar-toggle.tsx
MingruiZhang's picture
init
3ba9c0c unverified
raw
history blame
548 Bytes
'use client'
import * as React from 'react'
import { useSidebar } from '@/lib/hooks/use-sidebar'
import { Button } from '@/components/ui/button'
import { IconSidebar } from '@/components/ui/icons'
export function SidebarToggle() {
const { toggleSidebar } = useSidebar()
return (
<Button
variant="ghost"
className="-ml-2 hidden size-9 p-0 lg:flex"
onClick={() => {
toggleSidebar()
}}
>
<IconSidebar className="size-6" />
<span className="sr-only">Toggle Sidebar</span>
</Button>
)
}