Skip to content

Commit

Permalink
update storybook conf
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow committed Nov 30, 2023
1 parent e06566b commit 28b8730
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { type StorybookConfig } from '@storybook/nextjs'
import { merge } from 'merge-anything'

import { dirname, join } from 'path'

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
Expand All @@ -10,10 +12,10 @@ const config: StorybookConfig = {
},
],
addons: [
'@storybook/addon-a11y',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
getAbsolutePath('@storybook/addon-a11y'),
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
name: '@storybook/nextjs',
Expand Down Expand Up @@ -47,3 +49,7 @@ const config: StorybookConfig = {
}

export default config

function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')))
}

0 comments on commit 28b8730

Please sign in to comment.