Skip to content

Commit

Permalink
chore: set auto docs by tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jordmccord committed Feb 27, 2024
1 parent d79ccfe commit ec15784
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
16 changes: 8 additions & 8 deletions apps/native-ui-storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dirname, join } from "path";
import { dirname, join } from 'path';
const path = require('path');
/** @type{import("@storybook/react-webpack5").StorybookConfig} */
module.exports = {
Expand All @@ -8,17 +8,17 @@ module.exports = {
'../components/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@storybook/addon-react-native-web"),
getAbsolutePath("@storybook/addon-mdx-gfm")
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-react-native-web'),
getAbsolutePath('@storybook/addon-mdx-gfm'),
],
framework: {
name: getAbsolutePath("@storybook/react-webpack5"),
name: getAbsolutePath('@storybook/react-webpack5'),
options: {},
},
docs: {
autodocs: true,
autodocs: 'tag',
},
webpackFinal: async config => {
config.resolve.alias = {
Expand All @@ -31,5 +31,5 @@ module.exports = {
};

function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, "package.json")));
return dirname(require.resolve(join(value, 'package.json')));
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Variants from './Variants';

const AlertMeta: Meta<typeof Alert> = {
title: 'components/Alert',
tags: ['autodocs'],
component: Alert,
// metaInfo is required for figma generation
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Badge from './Badge';

const BadgeMeta: Meta<typeof Badge> = {
title: 'components/Badge',
tags: ['autodocs'],
component: Badge,
// metaInfo is required for figma generation
// @ts-ignore
Expand Down

0 comments on commit ec15784

Please sign in to comment.