Skip to content

Commit

Permalink
Merge pull request #2 from etchteam/fix/storybook-v7
Browse files Browse the repository at this point in the history
Storybook v7 support
  • Loading branch information
DanWebb authored May 9, 2023
2 parents 2d27af0 + 9336945 commit 5e2c906
Show file tree
Hide file tree
Showing 9 changed files with 12,229 additions and 19,994 deletions.
8 changes: 3 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ module.exports = {
"browser": true,
"es2021": true
},
"extends": "plugin:react/recommended",
"extends": ["plugin:react/recommended", "plugin:storybook/recommended"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react"
],
"plugins": ["react"],
"rules": {
"react/display-name": false
}
};
};
20 changes: 10 additions & 10 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = {
"stories": [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"../src/preset"
]
}
"stories": ["../stories/**/*.stories.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
"addons": ["@storybook/addon-links", "@storybook/addon-essentials", "../src/preset"],
framework: {
name: "@storybook/react-webpack5",
options: {}
},
docs: {
autodocs: true
}
};
27 changes: 12 additions & 15 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import { addDecorator } from '@storybook/react';
import withMarker from '../src/with-marker';

addDecorator(withMarker);

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
const preview = {
parameters: {
marker: {
destination: '60f162459a86003bf9d741b3',
mode: 'advanced'
}
},
marker: {
destination: '60f162459a86003bf9d741b3',
mode: 'advanced'
}
}
decorators: [
withMarker,
],
};

export default preview;
Loading

0 comments on commit 5e2c906

Please sign in to comment.