Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
cache
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
blocks
/
single-product
/
edit
:
editor-block-controls.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { BlockControls } from '@wordpress/block-editor'; import { ToolbarGroup } from '@wordpress/components'; /** * Adds controls to the editor toolbar. * * @param {Object} props Incoming props for the component. * @param {boolean} props.isEditing * @param {function(boolean):any} props.setIsEditing */ const EditorBlockControls = ( { isEditing, setIsEditing } ) => { return ( <BlockControls> <ToolbarGroup controls={ [ { icon: 'edit', title: __( 'Edit', 'woocommerce' ), onClick: () => setIsEditing( ! isEditing ), isActive: isEditing, }, ] } /> </BlockControls> ); }; export default EditorBlockControls;