diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index 2106c2031491fe..9f2a9048af4c0b 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -18,10 +18,11 @@ import { useEffect, useState, useRef, useMemo } from '@wordpress/element'; import { Button, ButtonGroup, - PanelBody, TextControl, ToolbarButton, Popover, + __experimentalToolsPanel as ToolsPanel, + __experimentalToolsPanelItem as ToolsPanelItem, } from '@wordpress/components'; import { AlignmentControl, @@ -123,26 +124,39 @@ function WidthPanel( { selectedWidth, setAttributes } ) { } return ( - - - { [ 25, 50, 75, 100 ].map( ( widthValue ) => { - return ( - - ); - } ) } - - + { + handleChange( undefined ); + } } + > + !! selectedWidth } + onDeselect={ () => handleChange( undefined ) } + > + + { [ 25, 50, 75, 100 ].map( ( widthValue ) => { + return ( + + ); + } ) } + + + ); }