playwright/.storybook/preview.js

34 lines
718 B
JavaScript
Raw Normal View History

2021-01-21 19:29:01 +03:00
import { addDecorator } from '@storybook/react';
import '../src/web/common.css';
import { applyTheme } from '../src/web/theme';
2021-01-21 19:29:01 +03:00
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
2021-01-29 01:25:10 +03:00
viewport: {
viewports: {
recorder: {
name: 'recorder',
styles: {
width: '800px',
height: '600px',
},
},
traceViewer: {
name: 'traceViewer',
styles: {
width: '1024px',
height: '768px',
},
},
},
defaultViewport: 'desktop'
}
2021-01-21 19:29:01 +03:00
}
addDecorator(storyFn => {
applyTheme();
return <div style={{backgroundColor: 'var(--background)', display: 'flex', flex: 'auto'}}>
2021-01-21 19:29:01 +03:00
{storyFn()}
</div>
});