- #151: chevauchement des boutons dans la barre supérieure pendant une conversation agent - #158: popup de reprise de conversation intempestive (ajout cellule / changement layout / projet) - #159: pastille d'activité de projet
This commit is contained in:
@ -7,12 +7,15 @@
|
||||
|
||||
import { cn } from "../lib/cn";
|
||||
import { IconButton } from "./IconButton";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
export interface TabItem {
|
||||
/** Stable id, returned by `onSelect`/`onClose`. */
|
||||
id: string;
|
||||
/** Visible label. */
|
||||
label: string;
|
||||
/** Optional leading visual, such as a status indicator. */
|
||||
leading?: ReactNode;
|
||||
}
|
||||
|
||||
export interface TabsProps {
|
||||
@ -52,11 +55,12 @@ export function Tabs({ items, value, onSelect, onClose, className }: TabsProps)
|
||||
aria-selected={active}
|
||||
onClick={() => onSelect(tab.id)}
|
||||
className={cn(
|
||||
"px-2 py-1 text-sm focus-visible:outline-none",
|
||||
"flex items-center gap-1.5 px-2 py-1 text-sm focus-visible:outline-none",
|
||||
active ? "font-semibold text-content" : "text-muted hover:text-content",
|
||||
)}
|
||||
>
|
||||
{tab.label}
|
||||
{tab.leading}
|
||||
<span>{tab.label}</span>
|
||||
</button>
|
||||
{onClose && (
|
||||
<IconButton
|
||||
|
||||
Reference in New Issue
Block a user