Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Storybook story for BlockFullHeightAlignmentControl #67227

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
},
};
Loading