Skip to content

Commit 80994f0

Browse files
committed
docs: fix storybook flashing
1 parent 575d47b commit 80994f0

7 files changed

Lines changed: 23 additions & 82 deletions

File tree

pnpm-lock.yaml

Lines changed: 0 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

storybook/.storybook/DocsContainer.tsx

Lines changed: 0 additions & 26 deletions
This file was deleted.

storybook/.storybook/main.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ const config: StorybookConfig = {
66
'../stories/**/*.mdx',
77
'../stories/**/*.@(story|stories).@(ts|tsx)',
88
],
9-
addons: [
10-
{
11-
name: '@storybook/addon-essentials',
12-
},
13-
'storybook-dark-mode',
14-
],
9+
addons: ['@storybook/addon-essentials'],
1510
core: {
1611
builder: '@storybook/builder-vite',
1712
},

storybook/.storybook/preview-head.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,22 @@
66
.sbdocs .sbdocs-hidden {
77
display: none;
88
}
9+
.sb-preparing-docs {
10+
background: #1b1c1d;
11+
}
12+
.sb-preparing-docs .sb-previewBlock {
13+
background: #2a2a2a;
14+
}
15+
.sb-preparing-docs .sb-argstableBlock-head {
16+
background: #1a1a1a;
17+
}
18+
.sb-preparing-docs .sb-argstableBlock-body td {
19+
background: #2a2a2a;
20+
}
21+
.sb-argstableBlock-body tr:not(:first-child) {
22+
border-top: 1px solid #1a1a1a;
23+
}
24+
.sb-preparing-docs .sb-previewBlock_icon {
25+
background: #727272;
26+
}
927
</style>

storybook/.storybook/preview.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
import 'intersection-observer';
22
import 'tailwindcss/tailwind.css';
33
import { themes } from '@storybook/theming';
4-
import { DocsContainer } from './DocsContainer';
54

65
export const parameters = {
76
controls: {
87
expanded: true,
98
},
10-
darkMode: {
11-
// Override the default dark theme
12-
dark: { ...themes.dark },
13-
// Override the default light theme
14-
light: { ...themes.normal },
9+
theme: {
10+
...themes.dark,
1511
},
1612
docs: {
17-
container: DocsContainer,
13+
theme: themes.dark,
1814
},
1915
};

storybook/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"prettier": "^2.8.4",
4747
"prettier-plugin-tailwindcss": "^0.2.4",
4848
"storybook": "7.0.0-beta.61",
49-
"storybook-dark-mode": "npm:storybook-dark-mode-v7",
5049
"typescript": "^4.9.5",
5150
"vite": "^4.1.4"
5251
}

storybook/stories/story-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const argTypes: ArgTypes<IntersectionOptions> = {
5353
},
5454
onChange: {
5555
table: { disable: true },
56+
action: 'InView',
5657
},
5758
};
5859

0 commit comments

Comments
 (0)