Add Storybook
This commit is contained in:
parent
38153e42dc
commit
f6e2517cb5
7 changed files with 34403 additions and 1752 deletions
3
.storybook/.babelrc
Normal file
3
.storybook/.babelrc
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"presets": ["@babel/preset-env", "@babel/preset-typescript"]
|
||||||
|
}
|
||||||
25
.storybook/main.ts
Normal file
25
.storybook/main.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
import type { StorybookViteConfig } from '@storybook/builder-vite';
|
||||||
|
|
||||||
|
const config: StorybookViteConfig = {
|
||||||
|
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||||
|
addons: [
|
||||||
|
'@storybook/addon-essentials',
|
||||||
|
{
|
||||||
|
name: '@storybook/addon-postcss',
|
||||||
|
options: {
|
||||||
|
postcssLoaderOptions: {
|
||||||
|
implementation: require('postcss'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
framework: '@storybook/react',
|
||||||
|
typescript: { check: false },
|
||||||
|
core: { builder: '@storybook/builder-vite' },
|
||||||
|
features: {
|
||||||
|
storyStoreV7: true,
|
||||||
|
},
|
||||||
|
viteFinal: (config) => config,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
5
.storybook/preview.ts
Normal file
5
.storybook/preview.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import 'tailwindcss/tailwind.css';
|
||||||
|
|
||||||
|
export const parameters = {
|
||||||
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
||||||
|
};
|
||||||
36103
package-lock.json
generated
36103
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -7,11 +7,18 @@
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro"
|
"astro": "astro",
|
||||||
|
"storybook": "start-storybook -p 6006",
|
||||||
|
"build-storybook": "build-storybook"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@astrojs/react": "^1.0.0",
|
"@astrojs/react": "^1.0.0",
|
||||||
"@astrojs/tailwind": "^1.0.0",
|
"@astrojs/tailwind": "^1.0.0",
|
||||||
|
"@storybook/addon-actions": "^6.5.10",
|
||||||
|
"@storybook/addon-essentials": "^6.5.10",
|
||||||
|
"@storybook/addon-postcss": "^2.0.0",
|
||||||
|
"@storybook/builder-vite": "^0.2.2",
|
||||||
|
"@storybook/react": "^6.5.10",
|
||||||
"@types/react": "^18.0.17",
|
"@types/react": "^18.0.17",
|
||||||
"@types/react-dom": "^18.0.6",
|
"@types/react-dom": "^18.0.6",
|
||||||
"astro": "^1.0.8",
|
"astro": "^1.0.8",
|
||||||
|
|
|
||||||
6
postcss.config.cjs
Normal file
6
postcss.config.cjs
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -26,8 +26,6 @@
|
||||||
// Report an error when a parameter is declared but never used.
|
// Report an error when a parameter is declared but never used.
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
// Force the usage of the indexed syntax to access fields declared using an index signature.
|
// Force the usage of the indexed syntax to access fields declared using an index signature.
|
||||||
"noUncheckedIndexedAccess": true,
|
"noUncheckedIndexedAccess": true
|
||||||
// Report an error when the value `undefined` is given to an optional property that doesn't specify `undefined` as a valid value.
|
|
||||||
"exactOptionalPropertyTypes": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue