Skip to content

Commit

Permalink
upgrade storybook to v8 (#7741)
Browse files Browse the repository at this point in the history
* upgrade storybook to v8

* bump version

* fix storybook builds

* cleanup
  • Loading branch information
sainak authored May 8, 2024
1 parent 5c4c8b3 commit 3025c46
Show file tree
Hide file tree
Showing 5 changed files with 4,329 additions and 5,891 deletions.
15 changes: 10 additions & 5 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {
builder: {
core: {
builder: {
name: "@storybook/builder-vite",
options: {
viteConfigPath: "./.storybook/vite.config.mts",
},
},
},
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
Expand Down
12 changes: 3 additions & 9 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<script>
window.global = window;
</script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
<script>
window.global = window;
</script>
3 changes: 1 addition & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import "../src/style/index.css";

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
date: /Date$/i,
},
},
},
Expand Down
Loading

0 comments on commit 3025c46

Please sign in to comment.