Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate examples to Storybook 7 #20

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions examples/babel/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
module.exports = {
"stories": [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-coverage",
],
"stories": ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
"addons": ["@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/addon-coverage"],
"framework": {
"name": "@storybook/react-webpack5",
"options": {}
},
docs: {
autodocs: true
}
}
};
5 changes: 4 additions & 1 deletion examples/babel/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
console.log(globalThis.__coverage__)
export const decorators = [(StoryFn) => {
console.log(globalThis.__coverage__)
return StoryFn()
}]

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand Down
14 changes: 7 additions & 7 deletions examples/babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"webpack-dev-server": "latest"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.0.0-alpha.34",
"@storybook/addon-interactions": "^7.0.0-alpha.34",
"@storybook/addon-essentials": "^7.4.2",
"@storybook/addon-interactions": "^7.4.2",
"@storybook/addon-coverage": "link:../..",
"@storybook/test-runner": "^0.7.2",
"@storybook/react": "^7.0.0-alpha.34",
"@storybook/react-webpack5": "^7.0.0-alpha.34",
"@storybook/testing-library": "^0.0.13",
"storybook": "^7.0.0-alpha.34"
"@storybook/test-runner": "^0.13.0",
"@storybook/react": "^7.4.2",
"@storybook/react-webpack5": "^7.4.2",
"@storybook/testing-library": "^0.2.1",
"storybook": "^7.4.2"
}
}
8,435 changes: 3,323 additions & 5,112 deletions examples/babel/yarn.lock

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions examples/vite/.storybook/main.cjs

This file was deleted.

15 changes: 15 additions & 0 deletions examples/vite/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-coverage",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: true,
},
};
3 changes: 0 additions & 3 deletions examples/vite/.storybook/preview-head.html

This file was deleted.

5 changes: 4 additions & 1 deletion examples/vite/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
console.log(globalThis.__coverage__)
export const decorators = [(StoryFn) => {
console.log(globalThis.__coverage__)
return StoryFn()
}]

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand Down
16 changes: 8 additions & 8 deletions examples/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.0.0-alpha.34",
"@storybook/addon-interactions": "^7.0.0-alpha.34",
"@storybook/addon-essentials": "7.4.2",
"@storybook/addon-interactions": "7.4.2",
"@storybook/addon-coverage": "link:../..",
"@storybook/react": "^7.0.0-alpha.34",
"@storybook/react-vite": "^7.0.0-alpha.34",
"@storybook/test-runner": "^0.7.2",
"@storybook/testing-library": "^0.0.13",
"@storybook/react": "7.4.2",
"@storybook/react-vite": "7.4.2",
"@storybook/test-runner": "^0.13.0",
"@storybook/testing-library": "^0.2.1",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.1.0",
"storybook": "^7.0.0-alpha.34",
"storybook": "7.4.2",
"typescript": "^4.6.4",
"vite": "^3.1.0"
"vite": "^4.2.1"
}
}
Loading
Loading