Skip to content

Commit

Permalink
allow controlling in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
noahwaldner committed Jan 31, 2025
1 parent 8280495 commit 9ee813b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/components/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import '../src/styles.scss';
import "@frontify/fondue-tokens/themeProvider/styles"
import { ThemeProvider } from '@frontify/fondue-tokens/themeProvider';
import type { Preview, Decorator } from '@storybook/react';
import { useDarkMode } from 'storybook-dark-mode';

import DocumentationTemplate from './DocumentationTemplate.mdx';


const ThemeProviderWrapper: Decorator = (Story: ComponentType) => {
const theme = useDarkMode() ? "dark" : "light";
return (
<ThemeProvider theme='light'>
<ThemeProvider theme={theme}>
<Story />
</ThemeProvider>
);
Expand Down

0 comments on commit 9ee813b

Please sign in to comment.