mirror of
https://github.com/acid-info/lsd.git
synced 2025-01-12 01:54:51 +00:00
fix: center tab text when there's no icon
This commit is contained in:
parent
8f5f6571bc
commit
8cf7500d00
@ -8,4 +8,6 @@ export const tabItemClasses = {
|
||||
small: 'lsd-tab-item--small',
|
||||
medium: 'lsd-tab-item--medium',
|
||||
large: 'lsd-tab-item--large',
|
||||
|
||||
tabWithoutIcon: 'lsd-tab-item--without-icon',
|
||||
}
|
||||
|
@ -41,6 +41,10 @@ export const TabItemStyles = css`
|
||||
}
|
||||
}
|
||||
|
||||
.${tabItemClasses.tabWithoutIcon} {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.${tabItemClasses.disabled} {
|
||||
cursor: default;
|
||||
opacity: 0.34;
|
||||
|
@ -51,6 +51,7 @@ export const TabItem: React.FC<TabItemProps> & {
|
||||
tabItemClasses[size],
|
||||
selected && tabItemClasses.selected,
|
||||
props.disabled && tabItemClasses.disabled,
|
||||
!icon && tabItemClasses.tabWithoutIcon,
|
||||
)}
|
||||
onClick={onClick}
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user