Skip to content

Commit

Permalink
implement header component (#15)
Browse files Browse the repository at this point in the history
* implement header component

* make header more configurable

* remove yarn.lock from .gitignore

* pass only backgroundImageUrl instead of the whole style object
  • Loading branch information
Andrei Volchenko authored and kirilknysh committed Sep 22, 2017
1 parent b7a8087 commit 41648ba
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 26 deletions.
1 change: 1 addition & 0 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@storybook/addon-knobs/register'
2 changes: 2 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { h } from 'preact';
import { configure, addDecorator } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

import { Layout } from '../src/components/Layout';

Expand All @@ -8,6 +9,7 @@ addDecorator(story => (
{ story() }
</Layout>
));
addDecorator(withKnobs);

function loadStories() {
require('./stories');
Expand Down
1 change: 1 addition & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
1 change: 1 addition & 0 deletions .storybook/stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('../src/components/Header/Header.story');
164 changes: 139 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
},
"homepage": "https://github.com/21-23/cssqd-ui#readme",
"dependencies": {
"preact": "^8.2.5"
"preact": "^8.2.5",
"react-fontawesome": "^1.6.1"
},
"devDependencies": {
"@storybook/addon-knobs": "^3.2.8",
"@storybook/react": "^3.2.8",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
Expand Down
Binary file added src/assets/images/header-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 41648ba

Please sign in to comment.