Skip to content

Commit

Permalink
Storybook: Organizes components under 'Utilities' (WordPress#66210)
Browse files Browse the repository at this point in the history
Co-authored-by: mattrwalker <mattryanwalker@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
  • Loading branch information
5 people authored and karthick-murugan committed Nov 13, 2024
1 parent 1cf65a2 commit 018245b
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 12 deletions.
3 changes: 2 additions & 1 deletion packages/components/src/animate/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { Animate } from '..';
import Notice from '../../notice';

const meta: Meta< typeof Animate > = {
title: 'Components/Animate',
title: 'Components/Utilities/Animate',
id: 'components-animate',
component: Animate,
parameters: {
controls: { expanded: true },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/composite/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { Composite } from '..';
import { Tooltip } from '../../tooltip';

const meta: Meta< typeof Composite > = {
title: 'Components/Composite',
title: 'Components/Utilities/Composite',
id: 'components-composite',
component: Composite,
subcomponents: {
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/disabled/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import TextareaControl from '../../textarea-control/';
import { VStack } from '../../v-stack/';

const meta: Meta< typeof Disabled > = {
title: 'Components/Disabled',
title: 'Components/Utilities/Disabled',
id: 'components-disabled',
component: Disabled,
argTypes: {
as: { control: { type: null } },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/draggable/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import Draggable from '..';

const meta: Meta< typeof Draggable > = {
component: Draggable,
title: 'Components/Draggable',
title: 'Components/Utilities/Draggable',
id: 'components-draggable',
argTypes: {
elementId: { control: { type: null } },
__experimentalDragComponent: { control: { type: null } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import KeyboardShortcuts from '..';

const meta: Meta< typeof KeyboardShortcuts > = {
component: KeyboardShortcuts,
title: 'Components/KeyboardShortcuts',
title: 'Components/Utilities/KeyboardShortcuts',
id: 'components-keyboardshortcuts',
parameters: {
controls: { expanded: true },
docs: { canvas: { sourceState: 'shown' } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import ResizableBox from '..';
import { useState } from '@wordpress/element';

const meta: Meta< typeof ResizableBox > = {
title: 'Components/ResizableBox',
title: 'Components/Utilities/ResizableBox',
id: 'components-resizablebox',
component: ResizableBox,
argTypes: {
children: { control: { type: null } },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/sandbox/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import SandBox from '..';

const meta: Meta< typeof SandBox > = {
component: SandBox,
title: 'Components/SandBox',
title: 'Components/Utilities/SandBox',
id: 'components-sandbox',
argTypes: {
onFocus: { control: { type: null } },
},
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/scroll-lock/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import ScrollLock from '..';

const meta: Meta< typeof ScrollLock > = {
component: ScrollLock,
title: 'Components/ScrollLock',
title: 'Components/Utilities/ScrollLock',
id: 'components-scrolllock',
parameters: {
controls: { hideNoControlsWarning: true },
docs: { canvas: { sourceState: 'shown' } },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/shortcut/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import Shortcut from '../';

const meta: Meta< typeof Shortcut > = {
component: Shortcut,
title: 'Components/Shortcut',
title: 'Components/Utilities/Shortcut',
id: 'components-shortcut',
parameters: {
controls: {
expanded: true,
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/slot-fill/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import { Slot, Fill, Provider as SlotFillProvider } from '../';

const meta: Meta< typeof Slot > = {
component: Slot,
title: 'Components/SlotFill',
title: 'Components/Utilities/SlotFill',
id: 'components-slotfill',
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
subcomponents: { Fill, SlotFillProvider },
argTypes: {
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/theme/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { HStack } from '../../h-stack';

const meta: Meta< typeof Theme > = {
component: Theme,
title: 'Components/Theme',
title: 'Components/Utilities/Theme',
id: 'components-theme',
argTypes: {
accent: { control: { type: 'color' } },
background: { control: { type: 'color' } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { VisuallyHidden } from '..';

const meta: Meta< typeof VisuallyHidden > = {
component: VisuallyHidden,
title: 'Components/VisuallyHidden',
title: 'Components/Utilities/VisuallyHidden',
id: 'components-visuallyhidden',
argTypes: {
children: { control: { type: null } },
as: { control: { type: 'text' } },
Expand Down
1 change: 1 addition & 0 deletions storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export const parameters = {
'Contributing Guidelines',
'Actions',
'Containers',
'Utilities',
],
'Components (Experimental)',
'Icons',
Expand Down

0 comments on commit 018245b

Please sign in to comment.