diff options
author | Thomas <thomas.b.huang@gmail.com> | 2018-05-09 04:10:26 +0800 |
---|---|---|
committer | Thomas <thomas.b.huang@gmail.com> | 2018-05-09 04:10:26 +0800 |
commit | 26c6bddebff70287b0fe805d78d2a13b0212805e (patch) | |
tree | e455a93a0f1cec3110f82ff2cb1b16ece1be110d /.storybook/decorators.js | |
parent | d59105299a5d1e192d0abc9ec8d249a22c7bb489 (diff) | |
parent | c3079ff160e0f0d0db8efb1b80692b293a363226 (diff) | |
download | tangerine-wallet-browser-26c6bddebff70287b0fe805d78d2a13b0212805e.tar tangerine-wallet-browser-26c6bddebff70287b0fe805d78d2a13b0212805e.tar.gz tangerine-wallet-browser-26c6bddebff70287b0fe805d78d2a13b0212805e.tar.bz2 tangerine-wallet-browser-26c6bddebff70287b0fe805d78d2a13b0212805e.tar.lz tangerine-wallet-browser-26c6bddebff70287b0fe805d78d2a13b0212805e.tar.xz tangerine-wallet-browser-26c6bddebff70287b0fe805d78d2a13b0212805e.tar.zst tangerine-wallet-browser-26c6bddebff70287b0fe805d78d2a13b0212805e.zip |
Merge branch 'develop' into e2e-tests
Diffstat (limited to '.storybook/decorators.js')
-rw-r--r-- | .storybook/decorators.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/.storybook/decorators.js b/.storybook/decorators.js new file mode 100644 index 000000000..7b0745ac4 --- /dev/null +++ b/.storybook/decorators.js @@ -0,0 +1,21 @@ +import React from 'react' +import { addDecorator } from '@storybook/react' +import { withInfo } from '@storybook/addon-info' +import { withKnobs } from '@storybook/addon-knobs/react' + +const styles = { + height: '100vh', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', +} + +const CenterDecorator = story => ( + <div style={styles}> + { story() } + </div> +) + +addDecorator((story, context) => withInfo()(story)(context)) +addDecorator(withKnobs) +addDecorator(CenterDecorator) |