File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
apps/storybook/.storybook
packages/notion-to-jsx/src/components/Renderer Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
- import type { Preview } from "@storybook/react" ;
2
- import { Decorator } from "@storybook/react" ;
1
+ import type { Preview } from '@storybook/react' ;
3
2
// 중요: CSS 파일을 직접 가져옵니다
4
3
import 'notion-to-jsx/dist/index.css' ;
5
4
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
5
const preview : Preview = {
15
6
parameters : {
16
7
controls : {
@@ -20,7 +11,6 @@ const preview: Preview = {
20
11
} ,
21
12
} ,
22
13
} ,
23
- decorators : [ withTheme ] ,
24
14
} ;
25
15
26
16
export default preview ;
Original file line number Diff line number Diff line change @@ -132,9 +132,12 @@ export const Renderer: React.FC<Props> = React.memo(
132
132
} , [ blocks , handleBlockFocus ] ) ;
133
133
134
134
return (
135
- < div className = { container } role = "main" aria-label = "Notion page content" >
135
+ < article
136
+ className = { `${ theme } ${ container } ` }
137
+ aria-label = "Notion page content"
138
+ >
136
139
{ renderedBlocks }
137
- </ div >
140
+ </ article >
138
141
) ;
139
142
}
140
143
) ;
You can’t perform that action at this time.
0 commit comments