File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export function VTab({
4444 onDrop = { onDrop }
4545 onDragEnd = { onDragEnd }
4646 className = { cn (
47- "group flex h-9 w-full cursor-pointer items-center gap-2 rounded-md border pl-2 pr-1 text-sm transition-colors select-none" ,
47+ "group relative flex h-9 w-full cursor-pointer items-center rounded-md border pl-2 pr-1 text-sm transition-colors select-none" ,
4848 "whitespace-nowrap" ,
4949 active
5050 ? "border-accent/40 bg-accent/20 text-primary"
@@ -55,16 +55,23 @@ export function VTab({
5555 ) }
5656 >
5757 { tab . indicator && (
58- < span className = "shrink-0 text-xs" style = { { color : tab . indicator . color || "#fbbf24" } } >
58+ < span className = "mr-1 shrink-0 text-xs" style = { { color : tab . indicator . color || "#fbbf24" } } >
5959 < i className = { makeIconClass ( tab . indicator . icon , true , { defaultIcon : "bell" } ) } />
6060 </ span >
6161 ) }
62- < span className = "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap" > { tab . name } </ span >
62+ < span
63+ className = { cn (
64+ "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap transition-[padding-right]" ,
65+ onClose && ! isReordering && "group-hover:pr-6"
66+ ) }
67+ >
68+ { tab . name }
69+ </ span >
6370 { onClose && (
6471 < button
6572 type = "button"
6673 className = { cn (
67- "shrink-0 -mr-1 cursor-pointer p-1 text-secondary transition" ,
74+ "absolute top-1/2 right-0 shrink-0 -translate-y-1/2 cursor-pointer p-1 text-secondary transition" ,
6875 isReordering ? "opacity-0" : "opacity-0 group-hover:opacity-100 hover:text-primary"
6976 ) }
7077 onClick = { ( event ) => {
You can’t perform that action at this time.
0 commit comments