Skip to content

Commit

Permalink
bug(NagivationTab): prevent min height if no children (#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol authored Aug 19, 2024
1 parent b7e60b9 commit f50368f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/designSystem/NavigationTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export const NavigationTab = ({
onChange={handleChange}
value={value}
$leftPadding={leftPadding}
$nonHiddenTabsLength={nonHiddenTabs.length}
>
{nonHiddenTabs.length >= 2
? nonHiddenTabs.map((tab, tabIndex) => {
Expand Down Expand Up @@ -151,10 +152,10 @@ const TabsWrapper = styled.div`
box-shadow: ${theme.shadows[7]};
`

const LocalTabs = styled(Tabs)<{ $leftPadding: boolean }>`
const LocalTabs = styled(Tabs)<{ $leftPadding: boolean; $nonHiddenTabsLength: number }>`
align-items: center;
overflow: visible;
min-height: ${theme.spacing(13)};
min-height: ${({ $nonHiddenTabsLength }) => $nonHiddenTabsLength > 1 && theme.spacing(13)};
${({ $leftPadding }) =>
!!$leftPadding &&
Expand Down

0 comments on commit f50368f

Please sign in to comment.