mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 01:06:23 +02:00
feat: add new layout system (Slack/ClickUp inspired)
This commit is contained in:
parent
2fd38615e8
commit
a919f8d9ee
28 changed files with 3059 additions and 0 deletions
34
surfsense_web/components/layout/ui/icon-rail/NavIcon.tsx
Normal file
34
surfsense_web/components/layout/ui/icon-rail/NavIcon.tsx
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"use client";
|
||||
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface NavIconProps {
|
||||
icon: LucideIcon;
|
||||
label: string;
|
||||
isActive?: boolean;
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
export function NavIcon({ icon: Icon, label, isActive, onClick }: NavIconProps) {
|
||||
return (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={onClick}
|
||||
className={cn("h-10 w-10 rounded-lg", isActive && "bg-accent text-accent-foreground")}
|
||||
>
|
||||
<Icon className="h-5 w-5" />
|
||||
<span className="sr-only">{label}</span>
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right" sideOffset={8}>
|
||||
{label}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue