2018-05-03 19:51:15 +02:00
|
|
|
import React from 'react'
|
2020-02-26 18:40:53 +01:00
|
|
|
import { addDecorator, addParameters } from '@storybook/react'
|
2018-05-03 19:51:15 +02:00
|
|
|
import { withKnobs } from '@storybook/addon-knobs/react'
|
2020-02-28 00:17:27 +01:00
|
|
|
import '../ui/app/css/index.scss'
|
2018-05-03 19:51:15 +02:00
|
|
|
|
2020-02-26 18:40:53 +01:00
|
|
|
addParameters({
|
|
|
|
backgrounds: [
|
|
|
|
{ name: 'light', value: '#FFFFFF'},
|
|
|
|
{ name: 'dark', value: '#333333' },
|
|
|
|
],
|
|
|
|
})
|
|
|
|
|
2018-05-03 19:51:15 +02:00
|
|
|
const styles = {
|
|
|
|
height: '100vh',
|
|
|
|
display: 'flex',
|
|
|
|
justifyContent: 'center',
|
|
|
|
alignItems: 'center',
|
|
|
|
}
|
|
|
|
|
|
|
|
const CenterDecorator = story => (
|
|
|
|
<div style={styles}>
|
|
|
|
{ story() }
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
|
|
|
|
addDecorator(withKnobs)
|
|
|
|
addDecorator(CenterDecorator)
|