diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index c7832ec7564202..e7342648a0b0dd 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -41,37 +41,9 @@ import getColorAndStyleProps from './color-props'; const NEW_TAB_REL = 'noreferrer noopener'; const MIN_BORDER_RADIUS_VALUE = 0; const MAX_BORDER_RADIUS_VALUE = 50; -const INITIAL_BORDER_RADIUS_POSITION = 5; const EMPTY_ARRAY = []; -function BorderPanel( { borderRadius = '', setAttributes } ) { - const initialBorderRadius = borderRadius; - const setBorderRadius = useCallback( - ( newBorderRadius ) => { - if ( newBorderRadius === undefined ) - setAttributes( { - borderRadius: initialBorderRadius, - } ); - else setAttributes( { borderRadius: newBorderRadius } ); - }, - [ setAttributes ] - ); - return ( - - - - ); -} - function WidthPanel( { selectedWidth, setAttributes } ) { function handleChange( newWidth ) { // Check if we are toggling the width off @@ -282,10 +254,19 @@ function ButtonEdit( props ) { anchorRef={ blockProps.ref } /> - + + + setAttributes( { borderRadius: radius } ) + } + /> +