Skip to content

Commit e0297f9

Browse files
committed
chore: fixes expansion and spacing to match design
1 parent 67144ca commit e0297f9

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

packages/chrome/src/styled/nav/StyledBrandmarkNavItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const StyledBrandmarkNavItem = styled(StyledBaseNavItem).attrs({
1616
'data-garden-version': PACKAGE_VERSION,
1717
as: 'li'
1818
})`
19-
flex: 1;
19+
flex: 0;
2020
order: 1;
2121
opacity: 0.3;
2222
margin-top: auto;

packages/chrome/src/styled/nav/StyledLogoNavItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const StyledLogoNavItem = styled(StyledBaseNavItem).attrs({
5454
'data-garden-version': PACKAGE_VERSION,
5555
as: 'li'
5656
})<IStyledLogoNavItemProps>`
57-
flex: 1;
57+
flex: 0;
5858
order: 0;
5959
opacity: 1;
6060
cursor: default;

packages/chrome/src/styled/nav/StyledNav.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export const StyledNav = styled.nav.attrs<IStyledNavProps>({
4040
'data-garden-id': COMPONENT_ID,
4141
'data-garden-version': PACKAGE_VERSION
4242
})<IStyledNavProps>`
43+
display: flex;
4344
position: relative;
45+
flex-direction: column;
4446
width: ${props => (props.isExpanded ? getExpandedNavWidth : getNavWidth)};
4547
font-size: ${props => props.theme.fontSizes.md};
4648

packages/chrome/src/styled/nav/StyledNavButton.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ interface IStyledNavItemProps extends ThemeProps<DefaultTheme> {
8181
* 2. Button reset
8282
* 3. Override `focusStyles` outline (in `colorStyles`)
8383
* 4. Use of negative offset to create an inset outline
84+
* 5. Overrides flex default `min-width: auto`
8485
*/
85-
export const StyledNavButton = styled(StyledBaseNavItem as 'button').attrs({
86+
export const StyledNavButton = styled(StyledBaseNavItem).attrs({
8687
'data-garden-id': COMPONENT_ID,
8788
'data-garden-version': PACKAGE_VERSION,
8889
as: 'button'
@@ -91,6 +92,7 @@ export const StyledNavButton = styled(StyledBaseNavItem as 'button').attrs({
9192
justify-content: ${props => props.isExpanded && 'start'};
9293
margin: 0; /* [2] */
9394
cursor: ${props => (props.isCurrent ? 'default' : 'pointer')};
95+
min-width: 0; /* [5] */
9496
text-align: ${props => props.isExpanded && 'inherit'};
9597
9698
&:hover,

0 commit comments

Comments
 (0)