Skip to content

Commit 059dcfc

Browse files
committed
upgrade and fix storybook
1 parent f9ee9b6 commit 059dcfc

69 files changed

Lines changed: 3539 additions & 4564 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/client/.storybook/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ const config = {
77
addons: [
88
"@storybook/addon-links",
99
"@storybook/addon-essentials",
10-
"@storybook/addon-interactions" // Recommended for SB8 + @storybook/test
10+
"@storybook/addon-interactions"
1111
],
1212

1313
framework: {
14-
// Updated to standard string format for SB8
1514
name: "@storybook/react-vite",
1615
options: {},
1716
},
@@ -31,11 +30,12 @@ const config = {
3130
},
3231

3332
docs: {
34-
autodocs: true
33+
defaultName: 'Documentation',
34+
autodocs: true,
35+
docsMode: true,
3536
},
3637

3738
typescript: {
38-
// 'react-docgen' is significantly faster in SB8 than 'react-docgen-typescript'
3939
reactDocgen: "react-docgen"
4040
}
4141
};

src/client/.storybook/manager.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ import bugTheme from "./BugTheme";
55

66
addons.setConfig({
77
theme: bugTheme,
8+
sidebar: {
9+
collapsedRoots: ['bug-core'],
10+
showStoriesView: false,
11+
},
812
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;700&display=swap" rel="stylesheet">
2+
<style>
3+
.stories-no-header h2 {
4+
display: none;
5+
}
6+
7+
.sbdocs.sbdocs-wrapper {
8+
padding-top: 20px;
9+
}
10+
11+
.docs-story {
12+
background-color: rgb(24, 24, 24);
13+
}
14+
15+
.sbdocs hr {
16+
margin: 20px 0;
17+
}
18+
19+
.sbdocs h2 {
20+
display: none;
21+
}
22+
</style>

src/client/.storybook/preview.jsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
1+
import { BugConfirmDialogProvider } from "@core/BugConfirmDialog";
2+
import { BugCustomDialogProvider } from "@core/BugCustomDialog";
3+
import { BugRenameDialogProvider } from "@core/BugRenameDialog";
14
import { ThemeProvider } from "@emotion/react";
25
import { ThemeProvider as MUIThemeProvider, StyledEngineProvider } from "@mui/material/styles";
3-
import { fn } from "@storybook/test";
6+
import reduxStore from "@redux/store";
47
import { themes } from "@storybook/theming";
58
import { Provider } from "react-redux";
69
import { MemoryRouter as Router } from "react-router";
7-
8-
import { BugConfirmDialogProvider } from "@core/BugConfirmDialog";
9-
import { BugCustomDialogProvider } from "@core/BugCustomDialog";
10-
import { BugRenameDialogProvider } from "@core/BugRenameDialog";
11-
import reduxStore from "@redux/store";
1210
import theme from "../src/theme";
1311

1412
const appTheme = theme();
1513

16-
/** @type { import('@storybook/react').Preview } */
1714
const preview = {
18-
args: {
19-
onClick: fn(),
20-
onChange: fn(),
21-
onSubmit: fn(),
22-
},
23-
2415
parameters: {
2516
controls: {
2617
expanded: true,
@@ -71,4 +62,4 @@ const preview = {
7162
],
7263
};
7364

74-
export default preview;
65+
export default preview;

0 commit comments

Comments
 (0)