Skip to content

Commit

Permalink
adding the Header component and its story (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 committed Sep 10, 2018
1 parent f385774 commit 176a877
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
36 changes: 36 additions & 0 deletions unlock-app/.storybook/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<style>

/**
* TODO remove after we have implemented a CSS template using styled-component
*/

@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');

:root {
--red: #ed663a;
--offwhite: #f6f6f6;
--lightgrey: #eeeeee;
--grey: #a6a6a6;
--darkgrey: #4a4a4a;
--slate: #333333;
--link: #4d8be8;
--green: #74ce63;
}

body {
font-family: 'IBM Plex Sans' ,'Helvetica Neue', Arial, sans-serif;
color: var(--grey);
}

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

h2 {
font-size: 15px;
font-weight: 500;
}

</style>
26 changes: 26 additions & 0 deletions unlock-app/src/components/interface/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React, { Component } from 'react'
import styled from 'styled-components'
import Icons from './icons'

export default class Header extends Component {
render() {
return (
<TopHeader>
<h1>Creator Dashboard</h1>
<a><Icons.About /></a>
<a><Icons.Jobs /></a>
<a><Icons.Github /></a>
</TopHeader>
)
}
}

const TopHeader = styled.header`
display: grid;
grid-gap: 16px;
grid-template-columns: 1fr;
grid-auto-flow: column;
align-items: center;
height: 72px;
font-size: 24px;
`
10 changes: 10 additions & 0 deletions unlock-app/src/stories/interface/Header.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 Header from '../../components/interface/Header'

storiesOf('Header')
.add('the header', () => {
return (
<Header />
)
})

0 comments on commit 176a877

Please sign in to comment.