Skip to content

Commit

Permalink
Story book added for block rename control
Browse files Browse the repository at this point in the history
  • Loading branch information
benazeer-ben committed Nov 28, 2024
1 parent 2f6ef27 commit 4f467bb
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';

/**
* Internal dependencies
*/
import BlockRenameControl from '../rename-control';

export default {
component: BlockRenameControl,
title: 'BlockEditor/BlockRenameControl',
};

export const Default = {
render: function Template( props ) {
const [ value, setValue ] = useState( 'New Name' );
return (
<BlockRenameControl
label="Rename"
value={ value }
onChange={ setValue }
{ ...props }
/>
);
},
args: {
__nextHasNoMarginBottom: true,
},
};

0 comments on commit 4f467bb

Please sign in to comment.