From 1fba4e10d1fca851c9a1178a65dbdb73f130e760 Mon Sep 17 00:00:00 2001 From: Fredrik Strand Oseberg Date: Tue, 28 Jan 2025 14:17:02 +0100 Subject: [PATCH] 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. --- frontend/src/component/project/Project/Project.styles.ts | 4 ++-- frontend/src/component/project/Project/Project.tsx | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/component/project/Project/Project.styles.ts b/frontend/src/component/project/Project/Project.styles.ts index dce665c270..b2fd4e2072 100644 --- a/frontend/src/component/project/Project/Project.styles.ts +++ b/frontend/src/component/project/Project/Project.styles.ts @@ -74,13 +74,13 @@ export const StyledTabContainer = styled('div')(({ theme }) => ({ export const StyledTab = styled(Tab)(({ theme }) => ({ textTransform: 'none', fontSize: theme.fontSizes.bodySize, - flexGrow: 1, flexBasis: 0, [theme.breakpoints.down('md')]: { paddingLeft: theme.spacing(1), paddingRight: theme.spacing(1), + minWidth: 170, }, [theme.breakpoints.up('md')]: { - minWidth: 160, + minWidth: 170, }, })); diff --git a/frontend/src/component/project/Project/Project.tsx b/frontend/src/component/project/Project/Project.tsx index 9126f8a944..3f9b88da21 100644 --- a/frontend/src/component/project/Project/Project.tsx +++ b/frontend/src/component/project/Project/Project.tsx @@ -76,7 +76,10 @@ interface ITab { const StyledCounterBadge = styled(CounterBadge)(({ theme }) => ({ '.MuiBadge-badge': { backgroundColor: theme.palette.background.alternative, - right: '2px', + right: '-4px', + }, + [theme.breakpoints.down('md')]: { + right: '6px', }, flex: 'auto', justifyContent: 'center',