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' ;
32// 중요: CSS 파일을 직접 가져옵니다
43import 'notion-to-jsx/dist/index.css' ;
54
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-
145const preview : Preview = {
156 parameters : {
167 controls : {
@@ -20,7 +11,6 @@ const preview: Preview = {
2011 } ,
2112 } ,
2213 } ,
23- decorators : [ withTheme ] ,
2414} ;
2515
2616export default preview ;
Original file line number Diff line number Diff line change @@ -132,9 +132,12 @@ export const Renderer: React.FC<Props> = React.memo(
132132 } , [ blocks , handleBlockFocus ] ) ;
133133
134134 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+ >
136139 { renderedBlocks }
137- </ div >
140+ </ article >
138141 ) ;
139142 }
140143) ;
You can’t perform that action at this time.
0 commit comments