mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
fix: tab label overflow style when there is only one tab (#7665)
before  after 
This commit is contained in:
@@ -125,8 +125,8 @@ const WorkbenchTab = ({
|
|||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{!workbench.pinned && tabsLength > 1 ? (
|
<div className={styles.tabCloseButtonWrapper}>
|
||||||
<div className={styles.tabCloseButtonWrapper}>
|
{!workbench.pinned && tabsLength > 1 ? (
|
||||||
<button
|
<button
|
||||||
data-testid="close-tab-button"
|
data-testid="close-tab-button"
|
||||||
className={styles.tabCloseButton}
|
className={styles.tabCloseButton}
|
||||||
@@ -134,8 +134,8 @@ const WorkbenchTab = ({
|
|||||||
>
|
>
|
||||||
<CloseIcon />
|
<CloseIcon />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
) : null}
|
||||||
) : null}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ export const tabCloseButtonWrapper = style({
|
|||||||
paddingRight: 4,
|
paddingRight: 4,
|
||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
selectors: {
|
selectors: {
|
||||||
[`${tab}:is([data-active=true], :hover) &`]: {
|
[`${tab}:is([data-active=true], :hover) &:not(:empty)`]: {
|
||||||
width: 40,
|
width: 40,
|
||||||
},
|
},
|
||||||
[`${tab}[data-active=true] &`]: {
|
[`${tab}[data-active=true] &`]: {
|
||||||
|
|||||||
Reference in New Issue
Block a user