import { cn } from "@/lib/utils"; import { X } from "lucide-react"; interface TabProps { fileName: string; isActive: boolean; brightnessLevel?: number; // New optional prop for brightness level onClick: () => void; onClose: () => void; } const brightnessLevels = [ "bg-background", "bg-background-200", // "bg-background-300", "bg-background-400", "bg-background-500", "bg-background-600", "bg-background-700", ]; export function CodeTab({ fileName, isActive, brightnessLevel = 0, onClick, onClose, }: TabProps) { const activeBrightnessClass = isActive ? brightnessLevels[brightnessLevel % brightnessLevels.length] : "bg-muted"; const textColor = isActive ? "text-foreground" : "text-muted-foreground"; const borderColor = isActive ? "border-t-foreground" : "border-t-transparent hover:bg-background/50"; return (
{fileName}
); }