diff --git a/packages/block-editor/src/components/block-heading-level-dropdown/stories/index.story.js b/packages/block-editor/src/components/block-heading-level-dropdown/stories/index.story.js new file mode 100644 index 0000000000000..5e2bf678379b8 --- /dev/null +++ b/packages/block-editor/src/components/block-heading-level-dropdown/stories/index.story.js @@ -0,0 +1,94 @@ +/** + * WordPress dependencies + */ +import { useState } from '@wordpress/element'; + +/** + * Internal dependencies + */ +import HeadingLevelDropdown from '../'; + +export default { + title: 'BlockEditor/HeadingLevelDropdown', + component: HeadingLevelDropdown, + argTypes: { + value: { + control: { type: 'number', min: 0, max: 6, step: 1 }, + description: 'The currently selected heading level.', + }, + options: { + control: 'array', + description: + 'An array of supported heading levels, e.g., [1, 2, 3, 4, 5, 6].', + }, + onChange: { + action: 'onChange', + description: + 'Callback triggered when a new heading level is selected.', + }, + }, + decorators: [ + ( Story ) => ( +
+ Selected Level:{ ' ' } + { selectedLevel === 0 ? 'Paragraph' : `H${ selectedLevel }` } +
+