Skip to content

Commit

Permalink
refactor(component): updated code structure from PR bigcommerce#165 (b…
Browse files Browse the repository at this point in the history
  • Loading branch information
chanceaclark authored and Ashley McKemie committed Sep 30, 2019
1 parent 98f54db commit 495165e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
5 changes: 4 additions & 1 deletion packages/docs/components/SideNav/SideNav.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Flex } from '@bigcommerce/big-design';
import React from 'react';

import { StyledFlex } from './styled';
Expand All @@ -15,7 +16,9 @@ export const SideNav: React.FC = () => {
padding="medium"
paddingBottom={{ mobile: 'medium', tablet: 'xxxLarge' }}
>
<SideNavLogo />
<Flex.Item>
<SideNavLogo />
</Flex.Item>

<SideNavMenu>
<SideNavGroup title="Introduction">
Expand Down
12 changes: 5 additions & 7 deletions packages/docs/components/SideNav/SideNavLogo/SideNavLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import React from 'react';
import { StyledLogo } from './styled';

export const SideNavLogo: React.FC = () => (
<Flex.Item>
<Link href="/GettingStarted/GettingStartedPage" as="/">
<StyledLogo>
<img src={`${process.env.URL_PREFIX}/static/logo-with-text.svg`} alt="BigDesign Logo" />
</StyledLogo>
</Link>
</Flex.Item>
<Link href="/GettingStarted/GettingStartedPage" as="/">
<StyledLogo>
<img src={`${process.env.URL_PREFIX}/static/logo-with-text.svg`} alt="BigDesign Logo" />
</StyledLogo>
</Link>
);
2 changes: 1 addition & 1 deletion packages/docs/components/SideNav/SideNavMenu/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const StyledNavigation = styled(Flex.Item)<Navigation>`
position: absolute;
top: 100%;
width: 100%;
z-index: 1;
z-index: ${({ theme }) => theme.zIndex.dropdown};
${({ theme }) => theme.breakpoints.tablet} {
border: 0;
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/components/SideNav/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export const StyledFlex = styled(Flex)`
background-color: ${({ theme }) => theme.colors.secondary10};
border-radius: 0;
position: fixed;
width: 100%;
z-index: 2;
top: 0;
width: 100%;
z-index: ${({ theme }) => theme.zIndex.sticky};
${({ theme }) => theme.breakpoints.tablet} {
bottom: 0;
Expand Down
7 changes: 1 addition & 6 deletions packages/docs/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ export default class MyApp extends App {
<ThemeProvider theme={theme}>
<>
<GlobalStyles />
<Grid
gridTemplate={{ mobile: gridTemplate.mobile, tablet: gridTemplate.tablet }}
backgroundColor="secondary10"
gridGap="0"
style={{ minHeight: '100%' }}
>
<Grid gridTemplate={gridTemplate} backgroundColor="secondary10" gridGap="0" style={{ minHeight: '100%' }}>
<Grid.Item gridArea="nav">
<SideNav />
</Grid.Item>
Expand Down

0 comments on commit 495165e

Please sign in to comment.