Skip to content

Commit 27aa046

Browse files
committed
try fixing docs
1 parent 80f5fa4 commit 27aa046

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.storybook-s2/preview.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import { themes } from 'storybook/theming';
33
import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode';
44
import { store } from 'storybook-dark-mode/dist/esm/Tool';
55
import { addons } from 'storybook/preview-api';
6-
import { DocsContainer } from '@storybook/addon-docs';
76
import React, { useEffect, useState } from 'react';
87
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';
109
import './global.css';
1110

1211
const channel = addons.getChannel();
@@ -29,8 +28,10 @@ const preview = {
2928
return () => channel.removeListener(DARK_MODE_EVENT_NAME, setDark);
3029
}, []);
3130
var style = getComputedStyle(document.body)
31+
console.log('got here');
3232
return <DocsContainer {...props} theme={{...(dark ? themes.dark : themes.light), appContentBg: style.getPropertyValue('--s2-container-bg').trim()}} />;
3333
},
34+
codePanel: true,
3435
source: {
3536
// code: null, // Will disable code button, and show "No code available"
3637
transform: (code: string, ctx) => {
@@ -44,7 +45,9 @@ const preview = {
4445
return code;
4546
}
4647
},
47-
page: () => (
48+
page: () => {
49+
console.log('got here 2');
50+
return (
4851
<>
4952
<Title />
5053
<Subtitle />
@@ -53,7 +56,7 @@ const preview = {
5356
<Controls />
5457
<Stories includePrimary={false} />
5558
</>
56-
)
59+
)}
5760
},
5861
darkMode: {
5962
light: {

0 commit comments

Comments
 (0)