diff --git a/packages/edit-site/src/components/global-styles/shadows-edit-panel.js b/packages/edit-site/src/components/global-styles/shadows-edit-panel.js index cf49d8c28ebcb..ec1dd1a900c3b 100644 --- a/packages/edit-site/src/components/global-styles/shadows-edit-panel.js +++ b/packages/edit-site/src/components/global-styles/shadows-edit-panel.js @@ -13,7 +13,6 @@ import { __experimentalItemGroup as ItemGroup, __experimentalInputControl as InputControl, __experimentalUnitControl as UnitControl, - __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue, __experimentalGrid as Grid, __experimentalDropdownContentWrapper as DropdownContentWrapper, __experimentalUseNavigator as useNavigator, @@ -21,7 +20,6 @@ import { __experimentalToggleGroupControlOption as ToggleGroupControlOption, __experimentalConfirmDialog as ConfirmDialog, Dropdown, - RangeControl, Button, Flex, FlexItem, @@ -35,7 +33,6 @@ import { plus, shadow as shadowIcon, reset, - settings, moreVertical, } from '@wordpress/icons'; import { useState, useMemo } from '@wordpress/element'; @@ -51,7 +48,6 @@ import { getShadowParts, shadowStringToObject, shadowObjectToString, - CUSTOM_VALUE_SETTINGS, } from './shadow-utils'; const { useGlobalSetting } = unlock( blockEditorPrivateApis ); @@ -464,13 +460,11 @@ function ShadowPopover( { shadowObj, onChange } ) { onShadowChange( 'x', value ) } /> onShadowChange( 'y', value ) } /> onShadowChange( 'spread', value ) } /> @@ -489,16 +482,7 @@ function ShadowPopover( { shadowObj, onChange } ) { ); } -function ShadowInputControl( { label, value, onChange, hasNegativeRange } ) { - const [ isCustomInput, setIsCustomInput ] = useState( false ); - const [ parsedQuantity, parsedUnit ] = - parseQuantityAndUnitFromRawValue( value ); - - const sliderOnChange = ( next ) => { - onChange( - next !== undefined ? [ next, parsedUnit || 'px' ].join( '' ) : '0px' - ); - }; +function ShadowInputControl( { label, value, onChange } ) { const onValueChange = ( next ) => { const isNumeric = next !== undefined && ! isNaN( parseFloat( next ) ); const nextValue = isNumeric ? next : '0px'; @@ -506,50 +490,11 @@ function ShadowInputControl( { label, value, onChange, hasNegativeRange } ) { }; return ( - - - { label } -