Skip to content

Commit

Permalink
chore: migrate breaking changes on storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
chedieck committed Jan 24, 2024
1 parent 82c43b2 commit 7a0ca7e
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 19 deletions.
18 changes: 18 additions & 0 deletions react/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100,
"safari": 15,
"firefox": 91
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
21 changes: 17 additions & 4 deletions react/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
module.exports = {
import type { StorybookConfig } from "@storybook/react-webpack5";

const config: StorybookConfig = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],

"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-a11y",
"@storybook/preset-create-react-app",
]
};
],

docs: {
autodocs: true
},

framework: {
name: "@storybook/react-webpack5",
options: {babelModeV7: true}
}
};

export default config
34 changes: 19 additions & 15 deletions react/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
export const parameters = {
controls: { expanded: true },
actions: { argTypesRegex: '^on.*' },
backgrounds: {
default: 'light',
values: [
{ name: 'light', value: '#f5f7f8' },
{ name: 'dark', value: '#282a2c' },
],
},
options: {
storySort: {
order: ['PayButton', 'Button', 'Widget'],
const preview = {
parameters: {
controls: { expanded: true },
actions: { argTypesRegex: '^on.*' },
backgrounds: {
default: 'light',
values: [
{ name: 'light', value: '#f5f7f8' },
{ name: 'dark', value: '#282a2c' },
],
},
},
};
options: {
storySort: {
order: ['PayButton', 'Button', 'Widget'],
},
},
}
};

export default preview

0 comments on commit 7a0ca7e

Please sign in to comment.