@@ -3,10 +3,9 @@ import { themes } from 'storybook/theming';
3
3
import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode' ;
4
4
import { store } from 'storybook-dark-mode/dist/esm/Tool' ;
5
5
import { addons } from 'storybook/preview-api' ;
6
- import { DocsContainer } from '@storybook/addon-docs' ;
7
6
import React , { useEffect , useState } from 'react' ;
8
7
import { withProviderSwitcher } from './custom-addons/provider' ;
9
- import { Controls , Description , Primary , Stories , Subtitle , Title } from '@storybook/addon-docs/blocks' ;
8
+ import { DocsContainer , Controls , Description , Primary , Stories , Subtitle , Title } from '@storybook/addon-docs/blocks' ;
10
9
import './global.css' ;
11
10
12
11
const channel = addons . getChannel ( ) ;
@@ -29,8 +28,10 @@ const preview = {
29
28
return ( ) => channel . removeListener ( DARK_MODE_EVENT_NAME , setDark ) ;
30
29
} , [ ] ) ;
31
30
var style = getComputedStyle ( document . body )
31
+ console . log ( 'got here' ) ;
32
32
return < DocsContainer { ...props } theme = { { ...( dark ? themes . dark : themes . light ) , appContentBg : style . getPropertyValue ( '--s2-container-bg' ) . trim ( ) } } /> ;
33
33
} ,
34
+ codePanel : true ,
34
35
source : {
35
36
// code: null, // Will disable code button, and show "No code available"
36
37
transform : ( code : string , ctx ) => {
@@ -44,7 +45,9 @@ const preview = {
44
45
return code ;
45
46
}
46
47
} ,
47
- page : ( ) => (
48
+ page : ( ) => {
49
+ console . log ( 'got here 2' ) ;
50
+ return (
48
51
< >
49
52
< Title />
50
53
< Subtitle />
@@ -53,7 +56,7 @@ const preview = {
53
56
< Controls />
54
57
< Stories includePrimary = { false } />
55
58
</ >
56
- )
59
+ ) }
57
60
} ,
58
61
darkMode : {
59
62
light : {
0 commit comments