import { __ } from '@wordpress/i18n'; import { useBlockProps, InspectorControls } from '@wordpress/block-editor'; import { PanelBody, ToggleControl, TextControl } from '@wordpress/components'; export const edit = ( props ) => { const blockProps = useBlockProps(); return ( <> props.setAttributes( { showHome: value ? true : false, } ) } /> { props.attributes.showHome ? ( { props.setAttributes( { homeLabel: value ?? 'Home', } ); } } value={ props.attributes.homeLabel ?? 'Home' } /> ) : ( '' ) }
); };