first commit
This commit is contained in:
32
examples/data-fetching/.storybook/main.ts
Normal file
32
examples/data-fetching/.storybook/main.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import path from 'path'
|
||||
import type { StorybookConfig } from '@storybook/nextjs'
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
addons: [
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-essentials',
|
||||
'@storybook/addon-interactions',
|
||||
'@storybook/addon-styling',
|
||||
],
|
||||
framework: {
|
||||
name: '@storybook/nextjs',
|
||||
options: {},
|
||||
},
|
||||
docs: {
|
||||
autodocs: 'tag',
|
||||
},
|
||||
async webpackFinal(config, options) {
|
||||
return {
|
||||
...config,
|
||||
resolve: {
|
||||
...config.resolve,
|
||||
alias: {
|
||||
...config.resolve?.alias,
|
||||
'@': path.resolve(__dirname, '../src/modules'),
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
export default config
|
||||
16
examples/data-fetching/.storybook/preview.ts
Normal file
16
examples/data-fetching/.storybook/preview.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import '../src/styles/main.css'
|
||||
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
|
||||
Reference in New Issue
Block a user