File tree Expand file tree Collapse file tree 5 files changed +10
-15
lines changed
packages/chrome/src/styled/nav Expand file tree Collapse file tree 5 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,7 @@ const sizeStyles = (props: ThemeProps<DefaultTheme>) => {
2626 ` ;
2727} ;
2828
29- /**
30- * 1. Button reset.
31- * 2. Anchor reset.
32- */
33- export const StyledBaseNavItem = styled . button . attrs ( {
29+ export const StyledBaseNavItem = styled . li . attrs ( {
3430 'data-garden-id' : COMPONENT_ID ,
3531 'data-garden-version' : PACKAGE_VERSION
3632} ) `
@@ -44,12 +40,7 @@ export const StyledBaseNavItem = styled.button.attrs({
4440 box-shadow 0.1s ease-in-out,
4541 background-color 0.1s ease-in-out,
4642 opacity 0.1s ease-in-out;
47- border: none; /* [1] */
4843 box-sizing: border-box;
49- background: transparent; /* [1] */
50- text-decoration: none; /* [2] */
51- color: inherit; /* [2] */
52- font-size: inherit; /* [1] */
5344
5445 ${ props => sizeStyles ( props ) }
5546` ;
Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ const COMPONENT_ID = 'chrome.brandmark_nav_list_item';
1313
1414export const StyledBrandmarkNavItem = styled ( StyledBaseNavItem ) . attrs ( {
1515 'data-garden-id' : COMPONENT_ID ,
16- 'data-garden-version' : PACKAGE_VERSION ,
17- as : 'li'
16+ 'data-garden-version' : PACKAGE_VERSION
1817} ) `
1918 flex: 0;
2019 order: 1;
Original file line number Diff line number Diff line change @@ -51,8 +51,7 @@ export interface IStyledLogoNavItemProps extends ThemeProps<DefaultTheme> {
5151
5252export const StyledLogoNavItem = styled ( StyledBaseNavItem ) . attrs ( {
5353 'data-garden-id' : COMPONENT_ID ,
54- 'data-garden-version' : PACKAGE_VERSION ,
55- as : 'li'
54+ 'data-garden-version' : PACKAGE_VERSION
5655} ) < IStyledLogoNavItemProps > `
5756 flex: 0;
5857 order: 0;
Original file line number Diff line number Diff line change @@ -91,9 +91,14 @@ export const StyledNavButton = styled(StyledBaseNavItem).attrs({
9191 flex: 1;
9292 justify-content: ${ props => props . isExpanded && 'start' } ;
9393 margin: 0; /* [2] */
94+ border: none; /* [2] */
95+ background: transparent; /* [2] */
9496 cursor: ${ props => ( props . isCurrent ? 'default' : 'pointer' ) } ;
9597 min-width: 0; /* [5] */
9698 text-align: ${ props => props . isExpanded && 'inherit' } ;
99+ text-decoration: none; /* [1] */
100+ color: inherit; /* [1] */
101+ font-size: inherit; /* [2] */
97102
98103 &:hover,
99104 &:focus {
Original file line number Diff line number Diff line change 77
88import styled from 'styled-components' ;
99import { retrieveComponentStyles , DEFAULT_THEME } from '@zendeskgarden/react-theming' ;
10+ import { StyledBaseNavItem } from './StyledBaseNavItem' ;
1011
1112const COMPONENT_ID = 'chrome.nav_list_item' ;
1213
13- export const StyledNavListItem = styled . li . attrs ( {
14+ export const StyledNavListItem = styled ( StyledBaseNavItem ) . attrs ( {
1415 'data-garden-id' : COMPONENT_ID ,
1516 'data-garden-version' : PACKAGE_VERSION
1617} ) `
You can’t perform that action at this time.
0 commit comments