Files
web/packages/design-system/.storybook/preview.tsx
2025-04-02 10:29:43 +02:00

38 lines
868 B
TypeScript

import { withThemeByClassName } from '@storybook/addon-themes'
import type { Preview, ReactRenderer } from '@storybook/react'
import '../lib/style.css'
import '../lib/fonts.css'
export const themes = {
themes: {
Scandic: 'scandic',
'Scandic Go': 'scandic-go',
'Downtown Camper': 'downtown-camper',
'Grand Hotel': 'grand-hotel',
Haymarket: 'haymarket',
'Hotel Norge': 'hotel-norge',
Marski: 'marski',
},
defaultTheme: 'Scandic',
}
const preview: Preview = {
decorators: [withThemeByClassName<ReactRenderer>(themes)],
parameters: {
docs: {
toc: true,
},
controls: { matchers: { color: /(background|color)$/i, date: /Date$/i } },
options: {
storySort: {
order: ['Introduction', 'Global', 'Components', 'Compositions', '*'],
},
},
},
tags: ['autodocs'],
}
export default preview