Refactor to use hooks (#436)
This commit is contained in:
parent
124efca9a1
commit
cb60f8b143
139 changed files with 8871 additions and 8726 deletions
|
|
@ -1,24 +0,0 @@
|
|||
'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>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue