Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import DocsContainer from './components/DocsContainer'
import Page from './components/Page'
import { dark, light } from './storybookThemes'
import '@ultraviolet/fonts/fonts.css'
import { withThemeByClassName } from '@storybook/addon-themes'

import { scan } from "react-scan"

Expand Down Expand Up @@ -140,6 +141,21 @@ const withThemeProvider = (Story: StoryFn, context: { globals: { theme: string }
)
}


const preview: Preview = {
decorators: [
withThemeByClassName({
themes: {
light: '',
dark: 'dark',
darker: "darker"
},
defaultTheme: 'light',
}),
],
};


const decorators = [
(Story: StoryFn, context: { globals: { theme: string } }) => {
const theme = context.globals.theme || "light"
Expand Down Expand Up @@ -171,5 +187,6 @@ const decorators = [
export default {
parameters,
decorators,
preview,
tags: ['autodocs']
} satisfies Preview
Loading