From 615a434664515761183efa84431e9fd93c69e7fc Mon Sep 17 00:00:00 2001 From: dhruvikpatel18 Date: Fri, 17 Jan 2025 10:43:44 +0530 Subject: [PATCH] Add: Added story for BlockSettingsMenuControls. --- .../stories/index.story.js | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 packages/block-editor/src/components/block-settings-menu-controls/stories/index.story.js diff --git a/packages/block-editor/src/components/block-settings-menu-controls/stories/index.story.js b/packages/block-editor/src/components/block-settings-menu-controls/stories/index.story.js new file mode 100644 index 0000000000000..ed110a5e28f24 --- /dev/null +++ b/packages/block-editor/src/components/block-settings-menu-controls/stories/index.story.js @@ -0,0 +1,61 @@ +/** + * Internal dependencies + */ +import BlockSettingsMenuControls from '../'; + +/** + * Storybook metadata + */ +const meta = { + title: 'BlockEditor/BlockSettingsMenuControls', + component: BlockSettingsMenuControls, + parameters: { + docs: { + description: { + component: + 'The `BlockSettingsMenuControls` component renders additional controls within the block settings menu, allowing for customization and extension of block options.', + }, + canvas: { sourceState: 'shown' }, + }, + }, + argTypes: { + clientIds: { + control: 'array', + description: + 'Array of clientIds for the blocks that will be acted upon. Determines which blocks the menu controls will affect.', + table: { + type: { summary: 'Array' }, + }, + }, + fillProps: { + control: 'object', + description: + 'Additional props to pass to the Slot fill. Can include properties like `onClose` to handle menu interactions.', + table: { + type: { summary: 'Object' }, + }, + }, + }, +}; + +export default meta; + +/** + * Default Story + */ +export const Default = { + args: { + clientIds: [ 'block-1', 'block-2' ], + fillProps: { + onClose: () => {}, + }, + }, + render: function Template( { clientIds, fillProps } ) { + return ( + + ); + }, +};