fix: center tab text when there's no icon

This commit is contained in:
jongomez 2023-10-23 13:56:48 +01:00 committed by Jon
parent 8f5f6571bc
commit 8cf7500d00
3 changed files with 7 additions and 0 deletions

View File

@ -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',
}

View File

@ -41,6 +41,10 @@ export const TabItemStyles = css`
}
}
.${tabItemClasses.tabWithoutIcon} {
justify-content: center;
}
.${tabItemClasses.disabled} {
cursor: default;
opacity: 0.34;

View File

@ -51,6 +51,7 @@ export const TabItem: React.FC<TabItemProps> & {
tabItemClasses[size],
selected && tabItemClasses.selected,
props.disabled && tabItemClasses.disabled,
!icon && tabItemClasses.tabWithoutIcon,
)}
onClick={onClick}
>