Skip to content

Commit

Permalink
Feat: Storybook: Improve component organisation - Navigation Category…
Browse files Browse the repository at this point in the history
… - Issue WordPress#66275  (WordPress#66658)

* Group the storybook components in Navigaiton category

* Fix tabs to add inside containers and add experimental id for component

* Fix the syntax style

Co-authored-by: hbhalodia <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored and karthick-murugan committed Nov 13, 2024
1 parent 8561db1 commit 802d16c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import ExternalLink from '..';

const meta: Meta< typeof ExternalLink > = {
component: ExternalLink,
title: 'Components/ExternalLink',
title: 'Components/Navigation/ExternalLink',
id: 'components-externallink',
argTypes: {
children: { control: { type: 'text' } },
},
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/navigator/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const meta: Meta< typeof Navigator > = {
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
BackButton: Navigator.BackButton,
},
title: 'Components/Navigator',
title: 'Components/Navigation/Navigator',
id: 'components-navigator',
argTypes: {
as: { control: { type: null } },
children: { control: { type: null } },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/tree-grid/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { Button } from '../../button';
import InputControl from '../../input-control';

const meta: Meta< typeof TreeGrid > = {
title: 'Components (Experimental)/TreeGrid',
title: 'Components (Experimental)/Navigation/TreeGrid',
id: 'components-experimental-treegrid',
component: TreeGrid,
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
subcomponents: { TreeGridRow, TreeGridCell },
Expand Down
2 changes: 2 additions & 0 deletions storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ export const parameters = {
'Actions',
'Containers',
'Feedback',
'Navigation',
'Utilities',
],
'Components (Experimental)',
[ 'Navigation' ],
'Icons',
],
},
Expand Down

0 comments on commit 802d16c

Please sign in to comment.