Skip to content

Commit

Permalink
Add storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Apr 5, 2023
1 parent d154ffc commit 93e1c0b
Show file tree
Hide file tree
Showing 25 changed files with 9,961 additions and 1,122 deletions.
15 changes: 15 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"sourceType": "module",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
]
}
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"standard-jsx",
"standard-react",
"plugin:react/jsx-runtime",
"plugin:storybook/recommended",
"prettier"
],
"plugins": ["simple-import-sort", "unused-imports"],
Expand Down
19 changes: 19 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { StorybookConfig } from '@storybook/react-webpack5'

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/react-webpack5',
options: {}
},
docs: {
autodocs: 'tag'
}
}

export default config
15 changes: 15 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react'

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

export default preview
Loading

0 comments on commit 93e1c0b

Please sign in to comment.