Get rid of custom components folder
This commit is contained in:
parent
c493ac342b
commit
6d16f67280
38 changed files with 34 additions and 34 deletions
26
components/sidebar-toggle.tsx
Normal file
26
components/sidebar-toggle.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { ComponentProps } from 'react';
|
||||
|
||||
import { SidebarTrigger, useSidebar } from '@/components/ui/sidebar';
|
||||
import { BetterTooltip } from '@/components/ui/tooltip';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
import { SidebarLeftIcon } from './icons';
|
||||
import { Button } from './ui/button';
|
||||
|
||||
export function SidebarToggle({
|
||||
className,
|
||||
}: ComponentProps<typeof SidebarTrigger>) {
|
||||
const { toggleSidebar } = useSidebar();
|
||||
|
||||
return (
|
||||
<BetterTooltip content="Toggle Sidebar" align="start">
|
||||
<Button
|
||||
onClick={toggleSidebar}
|
||||
variant="outline"
|
||||
className="md:px-2 md:h-fit"
|
||||
>
|
||||
<SidebarLeftIcon size={16} />
|
||||
</Button>
|
||||
</BetterTooltip>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue