Skip to content

Commit

Permalink
Block Editor: Update BlockVerticalAlignmentControl story descriptions…
Browse files Browse the repository at this point in the history
… and handlers
  • Loading branch information
himanshupathak95 committed Jan 3, 2025
1 parent 436c679 commit 73a3c08
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta = {
argTypes: {
value: {
control: { type: null },
description: 'Currently selected vertical alignment value.',
description: 'The current value of the alignment setting.',
table: {
type: {
summary: 'string',
Expand All @@ -36,7 +36,8 @@ const meta = {
onChange: {
action: 'onChange',
control: { type: null },
description: 'Handles change in vertical alignment selection.',
description:
"A callback function invoked when the toolbar's alignment value is changed via an interaction with any of the toolbar's buttons",
table: {
type: {
summary: 'function',
Expand All @@ -63,9 +64,9 @@ export const Default = {
return (
<BlockVerticalAlignmentControl
{ ...args }
onChange={ ( newValue ) => {
onChange( newValue );
setValue( newValue );
onChange={ ( ...changeArgs ) => {
onChange( ...changeArgs );
setValue( ...changeArgs );
} }
value={ value }
/>
Expand All @@ -79,9 +80,9 @@ export const Toolbar = {
return (
<BlockVerticalAlignmentToolbar
{ ...args }
onChange={ ( newValue ) => {
onChange( newValue );
setValue( newValue );
onChange={ ( ...changeArgs ) => {
onChange( ...changeArgs );
setValue( ...changeArgs );
} }
value={ value }
/>
Expand Down

0 comments on commit 73a3c08

Please sign in to comment.