Skip to content

Commit

Permalink
Add icons
Browse files Browse the repository at this point in the history
  • Loading branch information
schiehll committed May 24, 2019
1 parent e98d99e commit 8d2cba9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"open-color": "^1.6.3",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-icons": "^3.7.0",
"react-transition-group": "^4.0.1",
"styled-components": "^4.2.0",
"styled-media-query": "^2.1.1"
Expand Down
5 changes: 4 additions & 1 deletion src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Logo from 'components/logo'
import Nav from 'components/nav'
import Search from 'components/search'
import Widgets from 'components/widgets'
import { FiMenu } from 'react-icons/fi'
import { duration, overlayStyles, sideSheetStyles } from './transitions'

import * as S from './styles'
Expand All @@ -23,7 +24,9 @@ const Layout = () => {
</S.Sidebar>
<S.Content>
<S.Header>
<button onClick={toggleSideSheet}>open</button>
<S.SideSheetButton onClick={toggleSideSheet}>
<FiMenu />
</S.SideSheetButton>
<Search />
</S.Header>
<Widgets />
Expand Down
12 changes: 12 additions & 0 deletions src/components/layout/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,15 @@ export const SideSheet = styled.div`
z-index: 20;
`}
`

export const SideSheetButton = styled.button`
${({ theme: { spacing, colors } }) => css`
border: none;
background: none;
color: ${colors.gray[8]};
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
`}
`
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5165,6 +5165,13 @@ react-dom@^16.8.6:
prop-types "^15.6.2"
scheduler "^0.13.6"

react-icons@^3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-3.7.0.tgz#64fe46231fabfeea27895edeae6c3b78114b8c8f"
integrity sha512-7MyPwjIhuyW0D2N3s4DEd0hGPGFf0sK+IIRKhc1FvSpZNVmnUoGvHbmAwzGJU+3my+fvihVWgwU5SDtlAri56Q==
dependencies:
camelcase "^5.0.0"

react-is@^16.6.0, react-is@^16.8.1:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
Expand Down

0 comments on commit 8d2cba9

Please sign in to comment.