preview.ts 635 B

12345678910111213141516171819202122232425262728293031323334
  1. import type { Preview } from '@storybook/sveltekit';
  2. import '../src/app.css';
  3. import ModeWatcherDecorator from './ModeWatcherDecorator.svelte';
  4. import TooltipProviderDecorator from './TooltipProviderDecorator.svelte';
  5. const preview: Preview = {
  6. parameters: {
  7. controls: {
  8. matchers: {
  9. color: /(background|color)$/i,
  10. date: /Date$/i
  11. }
  12. },
  13. backgrounds: {
  14. disable: true
  15. }
  16. },
  17. decorators: [
  18. (story) => ({
  19. Component: ModeWatcherDecorator,
  20. props: {
  21. children: story
  22. }
  23. }),
  24. (story) => ({
  25. Component: TooltipProviderDecorator,
  26. props: {
  27. children: story
  28. }
  29. })
  30. ]
  31. };
  32. export default preview;