Use geist icons and group history by ranges (#471)

This commit is contained in:
Jeremy 2024-10-31 15:39:07 +05:30 committed by GitHub
parent dce1314084
commit 543267516e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 306 additions and 107 deletions

View file

@ -1,20 +1,26 @@
import { ComponentProps } from 'react';
import { SidebarTrigger } from '@/components/ui/sidebar';
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">
<SidebarTrigger
className={cn(
'size-10 md:size-8 [&>svg]:!size-5 md:[&>svg]:!size-4',
className
)}
/>
<Button
onClick={toggleSidebar}
variant="ghost"
className="md:px-2 md:h-fit"
>
<SidebarLeftIcon />
</Button>
</BetterTooltip>
);
}