diff --git a/packages/block-library/src/details/edit.js b/packages/block-library/src/details/edit.js index 314556ba6d591..14c89b7d0f9f0 100644 --- a/packages/block-library/src/details/edit.js +++ b/packages/block-library/src/details/edit.js @@ -9,7 +9,11 @@ import { InspectorControls, } from '@wordpress/block-editor'; import { useSelect } from '@wordpress/data'; -import { PanelBody, ToggleControl } from '@wordpress/components'; +import { + ToggleControl, + __experimentalToolsPanel as ToolsPanel, + __experimentalToolsPanelItem as ToolsPanelItem, +} from '@wordpress/components'; import { __ } from '@wordpress/i18n'; const TEMPLATE = [ @@ -46,18 +50,36 @@ function DetailsEdit( { attributes, setAttributes, clientId } ) { return ( <> - - { + setAttributes( { + showContent: false, + } ); + } } + > + + hasValue={ () => showContent } + onDeselect={ () => { setAttributes( { - showContent: ! showContent, - } ) - } - /> - + showContent: false, + } ); + } } + > + + setAttributes( { + showContent: ! showContent, + } ) + } + /> + +