Skip to content

Commit

Permalink
Adds categories to Storybooks navigation (#66072)
Browse files Browse the repository at this point in the history
Co-authored-by: mattrwalker <[email protected]>
Co-authored-by: mirka <[email protected]>
Co-authored-by: auareyou <[email protected]>
Co-authored-by: jasmussen <[email protected]>
  • Loading branch information
5 people authored Oct 16, 2024
1 parent 346fd4c commit 0decb96
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 7 deletions.
3 changes: 2 additions & 1 deletion packages/components/src/button/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import './style.css';
import Button from '..';

const meta: Meta< typeof Button > = {
title: 'Components/Button',
title: 'Components/Actions/Button',
id: 'components-button',
component: Button,
argTypes: {
// Overrides a limitation of the docgen interpreting our TS types for this as required.
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const meta: Meta< typeof Card > = {
component: Card,
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
subcomponents: { CardHeader, CardBody, CardDivider, CardMedia, CardFooter },
title: 'Components/Card',
title: 'Components/Containers/Card',
id: 'components-card',
argTypes: {
as: {
control: { type: null },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import type { Meta, StoryFn } from '@storybook/react';
import { NavigableMenu } from '..';

const meta: Meta< typeof NavigableMenu > = {
title: 'Components/NavigableMenu',
title: 'Components/Containers/NavigableMenu',
id: 'components-navigablemenu',
component: NavigableMenu,
argTypes: {
children: { control: { type: null } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import type { Meta, StoryFn } from '@storybook/react';
import { TabbableContainer } from '..';

const meta: Meta< typeof TabbableContainer > = {
title: 'Components/TabbableContainer',
title: 'Components/Containers/TabbableContainer',
id: 'components-tabbablecontainer',
component: TabbableContainer,
argTypes: {
children: { control: { type: null } },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/panel/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import InputControl from '../../input-control';
import { wordpress } from '@wordpress/icons';

const meta: Meta< typeof Panel > = {
title: 'Components/Panel',
title: 'Components/Containers/Panel',
id: 'components-panel',
component: Panel,
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
subcomponents: { PanelRow, PanelBody },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/tab-panel/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { link, more, wordpress } from '@wordpress/icons';
import TabPanel from '..';

const meta: Meta< typeof TabPanel > = {
title: 'Components/TabPanel',
title: 'Components/Containers/TabPanel',
id: 'components-tabpanel',
component: TabPanel,
parameters: {
actions: { argTypesRegex: '^on.*' },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/tabs/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import Tooltip from '../../tooltip';
import Icon from '../../icon';

const meta: Meta< typeof Tabs > = {
title: 'Components (Experimental)/Tabs',
title: 'Components/Containers/Tabs',
id: 'components-tabs',
component: Tabs,
subcomponents: {
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
Expand Down
1 change: 1 addition & 0 deletions storybook/manager-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'navigation',
'navigator',
'progressbar',
'tabs',
'theme',
];
const REDIRECTS = [
Expand Down
6 changes: 6 additions & 0 deletions storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ export const parameters = {
'Playground',
'BlockEditor',
'Components',
[
'Introduction',
'Contributing Guidelines',
'Actions',
'Containers',
],
'Components (Experimental)',
'Icons',
],
Expand Down

0 comments on commit 0decb96

Please sign in to comment.