Skip to content

Commit 5457735

Browse files
committed
fix: style on individual stories (#5465)
1 parent 7c36e19 commit 5457735

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.storybook/preview.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { globalStyles } from './components/globalStyle'
1313
import { dark, light } from './storybookThemes'
1414
import '@ultraviolet/fonts/fonts.css'
1515
import { scan } from "react-scan"
16+
import { ThemeProvider as ThemeProviderUI } from '@ultraviolet/ui'
1617

1718
const BREAKPOINT_ORDER = [
1819
'xlarge',
@@ -142,16 +143,16 @@ const withThemeProvider = (Story: StoryFn, context: { globals: { theme: string }
142143
}
143144

144145
const decorators = [
145-
(Story: StoryFn) => {
146-
return (
146+
(Story: StoryFn) => (
147147
<>
148-
{
149-
// eslint-disable-next-line react/jsx-curly-brace-presence
150-
<Story />
151-
}
148+
<ThemeProviderUI>
149+
{
150+
// eslint-disable-next-line react/jsx-curly-brace-presence
151+
<Story />
152+
}
153+
</ThemeProviderUI>
152154
</>
153-
) // Storybook is broken without this please refer to this issue: https://github.com/storybookjs/storybook/issues/24625
154-
},
155+
), // Storybook is broken without this please refer to this issue: https://github.com/storybookjs/storybook/issues/24625
155156
withThemeFromJSXProvider({
156157
themes: {
157158
light: lightTheme,

0 commit comments

Comments
 (0)