Skip to content

Commit

Permalink
adding footer component (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 committed Sep 20, 2018
1 parent dec9286 commit 73e0759
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unlock-app/.storybook/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,500,600,700');
@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Mono:200,500');
@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Mono:200i,200,500');
@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Serif:300,400');

:root {
Expand All @@ -27,7 +27,7 @@
}

h1 {
font-size: 24px;
font-size: 24px
font-weight: 500;
}

Expand Down
42 changes: 42 additions & 0 deletions unlock-app/src/components/interface/Footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React, { PureComponent } from 'react'
import styled from 'styled-components'
import Icons from './icons'

export default class Footer extends PureComponent {
render() {
return (
<Container>
<Button><Icons.About fill={'white'} /></Button>
<Button><Icons.Jobs fill={'white'} /></Button>
<Button><Icons.Github fill={'white'} /></Button>
<Colophon>Made with passion in Brooklyn, NY</Colophon>
</Container>
)
}
}

Footer.propTypes = {
}

const Container = styled.footer`
display: grid;
grid-gap: 16px;
grid-template-columns: repeat(3, 24px) 1fr;
grid-auto-flow: column;
align-items: center;
`

const Button = styled.a`
background-color: var(--grey);
border-radius: 50%;
height: 24px;
display: grid;
`

const Colophon = styled.span`
justify-self: end;
font-size: 12px;
font-weight: 200;
font-style: italic;
font-family: 'IBM Plex Mono', 'Courier New', Serif;
`
4 changes: 4 additions & 0 deletions unlock-app/src/components/interface/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import PropTypes from 'prop-types'
import React from 'react'
import styled from 'styled-components'
import Header from './Header'
import Footer from './Footer'
import Unlock from './icons/Unlock'

export default function Layout({ forContent, title, children }) {
Expand All @@ -15,6 +16,9 @@ export default function Layout({ forContent, title, children }) {
<Content>
<Header forContent={forContent} title={title} />
{children}
{forContent &&
<Footer />
}
</Content>
<Right />
</Container>
Expand Down
10 changes: 10 additions & 0 deletions unlock-app/src/stories/interface/Footer.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'
import { storiesOf } from '@storybook/react'
import Footer from '../../components/interface/Footer'

storiesOf('Footer')
.add('the footer', () => {
return (
<Footer />
)
})

0 comments on commit 73e0759

Please sign in to comment.