Skip to content

Commit

Permalink
SpacingInputControl: use CustomSelectControl V2 legacy adapter (#63190)
Browse files Browse the repository at this point in the history
Co-authored-by: ciampo <[email protected]>
Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
4 people authored Jul 9, 2024
1 parent f548ea3 commit 1f4891e
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

1 comment on commit 1f4891e

@den9713
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. К

Please sign in to comment.