diff --git a/packages/block-editor/src/components/off-canvas-editor/block-edit-button.js b/packages/block-editor/src/components/off-canvas-editor/block-edit-button.js new file mode 100644 index 00000000000000..15ae423ad5ddb8 --- /dev/null +++ b/packages/block-editor/src/components/off-canvas-editor/block-edit-button.js @@ -0,0 +1,23 @@ +/** + * WordPress dependencies + */ +import { edit } from '@wordpress/icons'; +import { Button } from '@wordpress/components'; +import { useDispatch } from '@wordpress/data'; + +/** + * Internal dependencies + */ +import { store as blockEditorStore } from '../../store'; + +const BlockEditButton = ( { label, clientId } ) => { + const { selectBlock } = useDispatch( blockEditorStore ); + + const onClick = () => { + selectBlock( clientId ); + }; + + return