Skip to content

Commit a5c5b40

Browse files
committed
update storybook dependencies
1 parent 7c11dd8 commit a5c5b40

251 files changed

Lines changed: 2709 additions & 6647 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.

web/.storybook/main.ts

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
1-
import { resolve } from "path";
1+
// This file has been automatically migrated to valid ESM format by Storybook.
2+
import { fileURLToPath } from "node:url";
3+
import { resolve, dirname } from "path";
24

35
import type { StorybookConfig } from "@storybook/react-vite";
46
import { mergeConfig } from "vite";
57

8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
611
const config: StorybookConfig = {
712
stories: ["../src/**/*.stories.@(js|ts|tsx|mdx)"],
8-
addons: ["@storybook/addon-essentials", "@storybook/addon-styling"],
13+
addons: [
14+
"@storybook/addon-onboarding",
15+
"@storybook/addon-a11y",
16+
"@storybook/addon-themes",
17+
"@chromatic-com/storybook",
18+
"@storybook/addon-docs"
19+
],
20+
921
framework: {
1022
name: "@storybook/react-vite",
1123
options: {},
1224
},
25+
1326
core: {
1427
disableTelemetry: true,
1528
},
29+
1630
staticDirs: ["./public"],
31+
1732
viteFinal(config, { configType }) {
1833
return mergeConfig(config, {
1934
define: {
@@ -65,8 +80,11 @@ const config: StorybookConfig = {
6580
},
6681
});
6782
},
68-
docs: {
69-
autodocs: true,
70-
},
83+
84+
docs: {},
85+
86+
typescript: {
87+
reactDocgen: "react-docgen-typescript"
88+
}
7189
};
72-
module.exports = config;
90+
export default config;

web/.storybook/manager.ts

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

web/.storybook/preview.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
Observable,
88
} from "@apollo/client";
99
import { ThemeProvider } from "@emotion/react";
10-
import { withThemeFromJSXProvider } from "@storybook/addon-styling";
11-
import type { Preview, ReactRenderer } from "@storybook/react";
10+
import { withThemeFromJSXProvider } from "@storybook/addon-themes";
11+
import type { Preview, ReactRenderer } from "@storybook/react-vite";
1212
import React from "react";
1313

1414
import classicDarkTheme from "../src/classic/theme/reearthTheme/darkTheme"; // temp classic imports
@@ -33,18 +33,18 @@ const mockClient = new ApolloClient({
3333
const preview: Preview = {
3434
parameters: {
3535
backgrounds: {
36-
values: [
37-
{ name: "Light", value: "lightGrey" },
38-
{ name: "Dark", value: "ash" },
39-
],
36+
options: {
37+
light: { name: "Light", value: "lightGrey" },
38+
dark: { name: "Dark", value: "ash" }
39+
},
4040
},
4141
layout: "fullscreen",
4242
controls: { expanded: true },
43-
actions: { argTypesRegex: "^on.*" },
4443
docs: {
4544
theme,
4645
},
4746
},
47+
4848
decorators: [
4949
withThemeFromJSXProvider<ReactRenderer>({
5050
themes: {
@@ -73,6 +73,8 @@ const preview: Preview = {
7373
);
7474
},
7575
],
76+
77+
tags: ["autodocs"]
7678
};
7779

7880
export default preview;

web/.storybook/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { create } from "@storybook/theming";
1+
import { create } from "storybook/theming";
22

33
export default create({
44
base: "dark",

web/.yarn/install-state.gz

-437 KB
Binary file not shown.

0 commit comments

Comments
 (0)