We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a2cd27 commit 10a5444Copy full SHA for 10a5444
apps/storybook/.storybook/preview.ts
@@ -1,7 +1,16 @@
1
import type { Preview } from "@storybook/react";
2
+import { Decorator } from "@storybook/react";
3
// 중요: CSS 파일을 직접 가져옵니다
4
import 'notion-to-jsx/dist/index.css';
5
6
+// 모든 스토리에 테마 클래스를 글로벌하게 적용하는 데코레이터 추가
7
+const withTheme: Decorator = (StoryFn, context) => {
8
+ const story = StoryFn(context);
9
+ // DOM에 직접 테마 클래스 추가
10
+ document.body.classList.add('theme_lightTheme__sq3jkbt');
11
+ return story;
12
+};
13
+
14
const preview: Preview = {
15
parameters: {
16
controls: {
@@ -11,6 +20,7 @@ const preview: Preview = {
20
},
21
22
23
+ decorators: [withTheme],
24
};
25
26
export default preview;
0 commit comments