1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00

fix: tabs not growing to fill all available space (#9161)

Fix an issue where tabs would fill out all available space, now it's
left aligned.
This commit is contained in:
Fredrik Strand Oseberg 2025-01-28 14:17:02 +01:00 committed by GitHub
parent ddf8a02c1e
commit 1fba4e10d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -74,13 +74,13 @@ export const StyledTabContainer = styled('div')(({ theme }) => ({
export const StyledTab = styled(Tab)(({ theme }) => ({ export const StyledTab = styled(Tab)(({ theme }) => ({
textTransform: 'none', textTransform: 'none',
fontSize: theme.fontSizes.bodySize, fontSize: theme.fontSizes.bodySize,
flexGrow: 1,
flexBasis: 0, flexBasis: 0,
[theme.breakpoints.down('md')]: { [theme.breakpoints.down('md')]: {
paddingLeft: theme.spacing(1), paddingLeft: theme.spacing(1),
paddingRight: theme.spacing(1), paddingRight: theme.spacing(1),
minWidth: 170,
}, },
[theme.breakpoints.up('md')]: { [theme.breakpoints.up('md')]: {
minWidth: 160, minWidth: 170,
}, },
})); }));

View File

@ -76,7 +76,10 @@ interface ITab {
const StyledCounterBadge = styled(CounterBadge)(({ theme }) => ({ const StyledCounterBadge = styled(CounterBadge)(({ theme }) => ({
'.MuiBadge-badge': { '.MuiBadge-badge': {
backgroundColor: theme.palette.background.alternative, backgroundColor: theme.palette.background.alternative,
right: '2px', right: '-4px',
},
[theme.breakpoints.down('md')]: {
right: '6px',
}, },
flex: 'auto', flex: 'auto',
justifyContent: 'center', justifyContent: 'center',