import type { Preview } from '@storybook/react';
import { MemoryRouter } from 'react-router-dom';
import '@mdxeditor/editor/style.css';
import './preview.css';
import '../src/styles/base.css';
import '../src/styles/components.css';

const preview: Preview = {
  decorators: [
    (Story) => (
      <MemoryRouter>
        <Story />
      </MemoryRouter>
    ),
  ],
  parameters: {
    controls: {
      matchers: {
        color: /(background|color)$/i,
        date: /Date$/i,
      },
    },
    layout: 'centered',
  },
};

export default preview;
