-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tools): install
storybook@alpha
, refactor all stories [#40]
- Loading branch information
Showing
14 changed files
with
2,388 additions
and
4,334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{ | ||
"presets": ["next/babel", "stage-0"], | ||
"presets": ["next/babel"], | ||
"plugins": [ | ||
[ | ||
"module-resolver", | ||
{ | ||
"root": ["./"] | ||
} | ||
], | ||
"@babel/plugin-proposal-export-default-from" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,37 @@ | ||
import { configure, setAddon } from '@storybook/react'; | ||
import infoAddon from '@storybook/addon-info'; | ||
import { configure, addDecorator } from '@storybook/react'; | ||
import { setDefaults } from '@storybook/addon-info'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
|
||
const req = require.context('../components', true, /\.stories\.js$/); | ||
import StoriesDecorator from 'stories/utils/StoriesDecorator'; | ||
|
||
const req = require.context('../stories', true, /.js$/); | ||
|
||
function loadStories() { | ||
req.keys().forEach(req); | ||
} | ||
|
||
setAddon(infoAddon); | ||
addDecorator(withKnobs); | ||
addDecorator(StoriesDecorator); | ||
setDefaults({ | ||
inline: true, | ||
styles: { | ||
header: { | ||
h1: { | ||
margin: 0, | ||
padding: 0, | ||
fontSize: '25px', | ||
color: '#1a9582', | ||
}, | ||
h2: { | ||
margin: 0, | ||
padding: 0, | ||
fontSize: '16px', | ||
}, | ||
body: { | ||
padding: 0, | ||
margin: 0, | ||
}, | ||
}, | ||
}, | ||
}); | ||
configure(loadStories, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const { definePlugin } = require('../webpack-plugins'); | ||
|
||
module.exports = function(storybookBaseConfig, env, defaultConfig) { | ||
defaultConfig.plugins.push(definePlugin); | ||
return defaultConfig; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.