Skip to content

Commit

Permalink
doc[menu]: make ArgsTable in Story scope
Browse files Browse the repository at this point in the history
  • Loading branch information
eizyc committed Mar 14, 2024
1 parent c3438d2 commit 4865b46
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ const config: StorybookConfig = {
},
},
docs: {
// autodocs: "tag",
autodocs: true
autodocs: "tag",
},
staticDirs: ["../public"],
features: {
Expand Down
11 changes: 0 additions & 11 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Preview } from "@storybook/react";
import { Title, Subtitle, Description, Primary, ArgsTable, Stories } from '@storybook/blocks';
import React from "react";
import "../src/styles/index.scss"
import { library } from '@fortawesome/fontawesome-svg-core';
Expand Down Expand Up @@ -39,16 +38,6 @@ const preview: Preview = {
},
format: true
},
page: () => (
<>
<Title />
<Subtitle />
<Description />
<Primary />
<ArgsTable />
<Stories />
</>
),
},
playground: {
storyId: "playground",
Expand Down
17 changes: 17 additions & 0 deletions src/components/Menu/menu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { action } from '@storybook/addon-actions'
import { Title, Subtitle, Description, Primary, ArgsTable, Stories } from '@storybook/blocks';
import type { Meta, StoryObj } from '@storybook/react'
import Menu from './menu'
import MenuItem from './menuItem'
Expand Down Expand Up @@ -104,6 +105,22 @@ const meta:Meta<typeof Menu> = {
// @ts-ignore
SubMenu
},
parameters: {
docs: {
page: () => {
return (
<>
<Title />
<Subtitle />
<Description />
<Primary />
<ArgsTable />
<Stories />
</>
)
},
}
},
tags: ['autodocs'],
};

Expand Down

0 comments on commit 4865b46

Please sign in to comment.