Skip to content

Commit

Permalink
fix: tab label overflow style when there is only one tab
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed Jul 31, 2024
1 parent ede5760 commit 596ea69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,17 @@ const WorkbenchTab = ({
</Fragment>
);
})}
{!workbench.pinned && tabsLength > 1 ? (
<div className={styles.tabCloseButtonWrapper}>
<div className={styles.tabCloseButtonWrapper}>
{!workbench.pinned && tabsLength > 1 ? (
<button
data-testid="close-tab-button"
className={styles.tabCloseButton}
onClick={onCloseTab}
>
<CloseIcon />
</button>
</div>
) : null}
) : null}
</div>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const tabCloseButtonWrapper = style({
paddingRight: 4,
justifyContent: 'flex-end',
selectors: {
[`${tab}:is([data-active=true], :hover) &`]: {
[`${tab}:is([data-active=true], :hover) &:not(:empty)`]: {
width: 40,
},
[`${tab}[data-active=true] &`]: {
Expand Down

0 comments on commit 596ea69

Please sign in to comment.