1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/.storybook/preview.js
Mark Stacey f751605d0d
Fix Storybook styles (#8133)
When the storybook config was migrated to the new module structure in
PR #8112 I forgot to include the line where the styles were imported.
2020-02-27 19:17:27 -04:00

28 lines
553 B
JavaScript

import React from 'react'
import { addDecorator, addParameters } from '@storybook/react'
import { withKnobs } from '@storybook/addon-knobs/react'
import '../ui/app/css/index.scss'
addParameters({
backgrounds: [
{ name: 'light', value: '#FFFFFF'},
{ name: 'dark', value: '#333333' },
],
})
const styles = {
height: '100vh',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}
const CenterDecorator = story => (
<div style={styles}>
{ story() }
</div>
)
addDecorator(withKnobs)
addDecorator(CenterDecorator)