Skip to content

Commit

Permalink
Merge pull request #174 from MetroStar/storybook-8.1.6
Browse files Browse the repository at this point in the history
Upgrade Storybook to 8.1.6
  • Loading branch information
jbouder authored Jun 6, 2024
2 parents 2127557 + 2035f7f commit ada16dd
Show file tree
Hide file tree
Showing 4 changed files with 2,045 additions and 1,750 deletions.
26 changes: 18 additions & 8 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { dirname, join } from "path";
/** @type { import('@storybook/react-vite').StorybookConfig } */
const config = {
stories: [
Expand All @@ -6,18 +7,27 @@ const config = {
'../packages/comet-extras/src/**/*.@(mdx|stories.@(tsx))',
'../packages/comet-uswds/src/**/*.mdx',
],

addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@storybook/addon-interactions"),
getAbsolutePath("@storybook/addon-a11y"),
],

framework: {
name: '@storybook/react-vite',
name: getAbsolutePath("@storybook/react-vite"),
options: {},
},
docs: {
autodocs: true,
},

docs: {},

typescript: {
reactDocgen: "react-docgen-typescript"
}
};
export default config;

function getAbsolutePath(value) {
return dirname(require.resolve(join(value, "package.json")));
}
2 changes: 2 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ const preview = {
},
},
},

tags: ['autodocs']
};
export default preview;
Loading

0 comments on commit ada16dd

Please sign in to comment.