File tree Expand file tree Collapse file tree
packages/emcn/src/components/tab-strip Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -448,15 +448,20 @@ const Tab = forwardRef<HTMLDivElement, TabProps>(function Tab(
448448 >
449449 { tab . icon }
450450 { ! tab . pinned && (
451- < span
452- ref = { titleRef }
453- className = { cn (
454- overflowTextClipClass ,
455- 'flex-1 select-none text-left' ,
456- titleTruncated && overflowTextFadeClass
457- ) }
458- >
459- { tab . title }
451+ < span className = 'min-w-0 flex-1 select-none text-left' >
452+ < span
453+ ref = { titleRef }
454+ className = { cn (
455+ overflowTextClipClass ,
456+ closeable &&
457+ ! tab . active &&
458+ ! tab . attention &&
459+ 'w-[calc(100%_+_24px)] group-focus-within:w-full group-hover:w-full [@media(hover:none)]:w-full' ,
460+ titleTruncated && overflowTextFadeClass
461+ ) }
462+ >
463+ { tab . title }
464+ </ span >
460465 </ span >
461466 ) }
462467 { tab . attention && ! tab . active && (
@@ -485,7 +490,7 @@ const Tab = forwardRef<HTMLDivElement, TabProps>(function Tab(
485490 '-translate-y-1/2 absolute top-1/2 right-0.5 z-20 size-[24px] p-0 transition-opacity' ,
486491 tab . active
487492 ? 'opacity-100'
488- : 'opacity-0 group-focus-within:opacity-100 group-hover:opacity-100'
493+ : 'pointer-events-none opacity-0 group-focus-within:pointer-events-auto group-focus-within: opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 [@media(hover:none)]:pointer-events-auto [@media(hover:none)] :opacity-100'
489494 ) }
490495 onClick = { ( event ) => {
491496 event . stopPropagation ( )
You can’t perform that action at this time.
0 commit comments