n8n/packages/design-system/.storybook/preview.js

61 lines
1.1 KiB
JavaScript
Raw Normal View History

2021-08-09 03:42:22 -07:00
import './font-awesome-icons';
import './storybook.scss';
2021-08-09 02:29:11 -07:00
2021-08-09 03:42:22 -07:00
import Vue from 'vue';
2021-08-09 02:29:11 -07:00
// https://github.com/storybookjs/storybook/issues/6153
Vue.prototype.toJSON = function () {
2021-08-09 03:35:39 -07:00
return this;
2021-08-09 02:29:11 -07:00
};
export const parameters = {
2021-08-09 03:35:39 -07:00
actions: {
2021-08-09 03:42:22 -07:00
argTypesRegex: '^on[A-Z].*',
2021-08-09 03:35:39 -07:00
},
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
backgrounds: {
2021-08-09 03:42:22 -07:00
default: '--color-background-xlight',
2021-08-09 03:35:39 -07:00
values: [
{
2021-08-09 03:42:22 -07:00
name: '--color-background-dark',
value: 'var(--color-background-dark)',
2021-08-09 03:35:39 -07:00
},
{
2021-08-09 03:42:22 -07:00
name: '--color-background-base',
value: 'var(--color-background-base)',
2021-08-09 03:35:39 -07:00
},
{
2021-08-09 03:42:22 -07:00
name: '--color-background-light',
value: 'var(--color-background-light)',
2021-08-09 03:35:39 -07:00
},
{
2021-08-09 03:42:22 -07:00
name: '--color-background-lighter',
value: 'var(--color-background-lighter)',
2021-08-09 03:35:39 -07:00
},
{
2021-08-09 03:42:22 -07:00
name: '--color-background-xlight',
value: 'var(--color-background-xlight)',
2021-08-09 03:35:39 -07:00
},
],
},
themes: {
list: [
{
2021-08-09 03:42:22 -07:00
name: 'dark',
class: 'theme-dark',
color: '#000',
2021-08-09 03:35:39 -07:00
},
],
},
options: {
storySort: {
2021-08-09 03:42:22 -07:00
order: ['Docs', 'Styleguide', 'Atoms'],
2021-08-09 03:35:39 -07:00
},
},
2021-08-09 03:22:21 -07:00
};