-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doc: Add Storybook story for BlockFullHeightAlignmentControl component
- Loading branch information
1 parent
58e2d4b
commit e5f2ef2
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
...es/block-editor/src/components/block-full-height-alignment-control/stories/index.story.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { registerCoreBlocks } from '@wordpress/block-library'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import BlockFullHeightAlignmentControl from '../'; | ||
|
||
/** | ||
* Registers core blocks for demonstration purposes. | ||
*/ | ||
registerCoreBlocks(); | ||
|
||
/** | ||
* BlockFullHeightAlignmentControl component renders a toolbar button for toggling full height alignment. | ||
*/ | ||
const meta = { | ||
title: 'BlockEditor/BlockFullHeightAlignmentControl', | ||
component: BlockFullHeightAlignmentControl, | ||
parameters: { | ||
docs: { canvas: { sourceState: 'shown' } }, | ||
}, | ||
argTypes: { | ||
isActive: { | ||
control: 'boolean', | ||
description: 'Whether the full height alignment is active.', | ||
}, | ||
label: { | ||
control: 'text', | ||
description: 'Label for the button in the toolbar.', | ||
}, | ||
onToggle: { | ||
action: 'onToggle', | ||
description: | ||
'Callback function to toggle the active state of the button.', | ||
}, | ||
isDisabled: { | ||
control: 'boolean', | ||
description: 'Whether the button is disabled.', | ||
}, | ||
}, | ||
}; | ||
export default meta; | ||
|
||
/** | ||
* Default story showing BlockFullHeightAlignmentControl with active state. | ||
*/ | ||
export const Default = { | ||
args: { | ||
isActive: true, | ||
}, | ||
}; |