mirror of
https://github.com/ershisan99/live-bundlers.git
synced 2025-12-16 20:59:24 +00:00
initial commit
This commit is contained in:
28
.storybook/main.ts
Normal file
28
.storybook/main.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { dirname, join } from 'path'
|
||||
import { StorybookConfig } from '@storybook/react-vite'
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(ts|tsx)'],
|
||||
addons: [
|
||||
getAbsolutePath('@storybook/addon-links'),
|
||||
getAbsolutePath('@storybook/addon-interactions'),
|
||||
getAbsolutePath('@storybook/addon-essentials'),
|
||||
],
|
||||
framework: {
|
||||
name: getAbsolutePath('@storybook/react-vite'),
|
||||
options: {},
|
||||
},
|
||||
docs: {
|
||||
autodocs: true,
|
||||
},
|
||||
viteFinal: config => {
|
||||
config.build = config.build || {}
|
||||
config.build.sourcemap = false
|
||||
return config
|
||||
},
|
||||
}
|
||||
export default config
|
||||
|
||||
function getAbsolutePath(value: string): any {
|
||||
return dirname(require.resolve(join(value, 'package.json')))
|
||||
}
|
||||
15
.storybook/preview.ts
Normal file
15
.storybook/preview.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { Preview } from '@storybook/react'
|
||||
import '../src/styles/index.scss'
|
||||
const preview: Preview = {
|
||||
parameters: {
|
||||
actions: { argTypesRegex: '^on[A-Z].*' },
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default preview
|
||||
Reference in New Issue
Block a user