Skip to content

Commit

Permalink
SpacingInputControl: use CustomSelectControl V2 legacy adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jul 9, 2024
1 parent d3b3749 commit ada7611
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
*/
import {
Button,
CustomSelectControl,
Icon,
RangeControl,
__experimentalHStack as HStack,
__experimentalUnitControl as UnitControl,
__experimentalUseCustomUnits as useCustomUnits,
__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,
privateApis as componentsPrivateApis,
} from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { useState, useMemo } from '@wordpress/element';
Expand All @@ -31,6 +31,11 @@ import {
getPresetValueFromCustomValue,
isValueSpacingPreset,
} from '../utils';
import { unlock } from '../../../lock-unlock';

const { CustomSelectControlV2Legacy: CustomSelectControl } = unlock(
componentsPrivateApis
);

const CUSTOM_VALUE_SETTINGS = {
px: { max: 300, steps: 1 },
Expand Down

0 comments on commit ada7611

Please sign in to comment.