|
1 | | -import classNames from 'classnames'; |
2 | 1 | import { NextIntlClientProvider } from 'next-intl'; |
3 | 2 |
|
4 | 3 | import { withThemeByDataAttribute } from '@storybook/addon-themes'; |
5 | 4 | import { NotificationProvider } from '@/providers/notificationProvider'; |
6 | | -import { |
7 | | - OPEN_SANS_FONT, |
8 | | - IBM_PLEX_MONO_FONT, |
9 | | - STORYBOOK_MODES, |
10 | | - STORYBOOK_SIZES, |
11 | | -} from '@/.storybook/constants'; |
| 5 | +import { STORYBOOK_MODES, STORYBOOK_SIZES } from '@/.storybook/constants'; |
12 | 6 | import type { Preview, ReactRenderer } from '@storybook/react'; |
13 | 7 |
|
14 | 8 | import englishLocale from '@/i18n/locales/en.json'; |
15 | 9 |
|
16 | 10 | import '../styles/new/index.css'; |
17 | 11 |
|
18 | | -const rootClasses = classNames( |
19 | | - OPEN_SANS_FONT.variable, |
20 | | - IBM_PLEX_MONO_FONT.variable, |
21 | | - 'font-open-sans' |
22 | | -); |
23 | | - |
24 | 12 | const preview: Preview = { |
25 | 13 | parameters: { |
26 | 14 | nextjs: { router: { basePath: '' }, appDirectory: true }, |
27 | 15 | chromatic: { modes: STORYBOOK_MODES }, |
28 | 16 | viewport: { defaultViewport: 'large', viewports: STORYBOOK_SIZES }, |
29 | 17 | }, |
30 | | - // These are extra Storybook Decorators applied to all stories |
31 | | - // that introduce extra functionality such as Theme Switching |
32 | | - // and all the App's Providers (Site, Theme, Locale) |
33 | 18 | decorators: [ |
34 | 19 | Story => ( |
35 | 20 | <NextIntlClientProvider locale="en" messages={englishLocale}> |
36 | 21 | <NotificationProvider viewportClassName="absolute top-0 left-0 list-none"> |
37 | | - <div className={rootClasses}> |
38 | | - <Story /> |
39 | | - </div> |
| 22 | + <Story /> |
40 | 23 | </NotificationProvider> |
41 | 24 | </NextIntlClientProvider> |
42 | 25 | ), |
43 | 26 | withThemeByDataAttribute<ReactRenderer>({ |
44 | | - themes: { |
45 | | - light: '', |
46 | | - dark: 'dark', |
47 | | - }, |
| 27 | + themes: { light: '', dark: 'dark' }, |
48 | 28 | defaultTheme: 'light', |
49 | 29 | attributeName: 'data-theme', |
50 | 30 | }), |
|
0 commit comments