mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 12:56:01 +01:00
22 lines
492 B
JavaScript
22 lines
492 B
JavaScript
|
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)
|