vega-frontend-monorepo/libs/ui-toolkit/.storybook/preview.js

30 lines
657 B
JavaScript
Raw Normal View History

2022-02-21 15:41:32 +00:00
import '../src/styles.scss';
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
2022-03-03 14:48:40 +00:00
/*themes: {
2022-02-21 15:41:32 +00:00
default: 'dark',
list: [
{ name: 'dark', class: ['dark', 'bg-black'], color: '#000' },
{ name: 'light', class: '', color: '#FFF' },
],
2022-03-03 14:48:40 +00:00
},*/
2022-02-21 15:41:32 +00:00
};
export const decorators = [
2022-03-04 16:21:24 +00:00
(Story, context) =>
context.parameters.themes === false ? (
<div className="text-body">
2022-03-03 14:48:40 +00:00
<Story />
</div>
2022-03-04 16:21:24 +00:00
) : (
<div className="text-body">
<div className="dark bg-black p-16">
<Story />
</div>
<div className="p-16">
<Story />
</div>
2022-03-03 14:48:40 +00:00
</div>
2022-03-04 16:21:24 +00:00
),
2022-02-21 15:41:32 +00:00
];