Skip to content

Commit

Permalink
Doc: Add Storybook story for BlockFullHeightAlignmentControl component
Browse files Browse the repository at this point in the history
  • Loading branch information
im3dabasia committed Nov 22, 2024
1 parent 58e2d4b commit e5f2ef2
Showing 1 changed file with 54 additions and 0 deletions.
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,
},
};

0 comments on commit e5f2ef2

Please sign in to comment.