import { useBlockProps, InspectorControls } from '@wordpress/block-editor'; import { PanelBody, ToggleControl, TextControl } from '@wordpress/components'; export default function Edit({ attributes, setAttributes }) { const { menuId, collapsed } = attributes; const blockProps = useBlockProps(); return ( <> setAttributes({ menuId: value })} help="PHP-generated menu identifier" /> setAttributes({ collapsed: value })} />

Drawer Menu: {menuId || 'Not configured'}

State: {collapsed ? 'Collapsed' : 'Expanded'}

); }