import { withDesign } from 'storybook-addon-designs';
import GlobalStyle from '../src/layout/GlobalStyle';

export const parameters = {
  options: {
    storySort: {
      order: ['Introduction', 'System', ['Colors', 'Spacing']],
    },
  },
  actions: { argTypesRegex: '^on[A-Z].*' },
  controls: {
    matchers: {
      color: /(background|color)$/i,
      date: /Date$/,
    },
  },
};

export const decorators = [
  withDesign,
  (Story, context) => (
    <>
      <GlobalStyle theme="day" />
      <Story {...context} />
    </>
  ),
];
