@wordpress/components
Version:
UI components for WordPress.
19 lines • 688 B
TypeScript
import type { UseControlledRangeValueArgs } from './types';
/**
* A float supported clamp function for a specific value.
*
* @param value The value to clamp.
* @param min The minimum value.
* @param max The maximum value.
*
* @return A (float) number
*/
export declare function floatClamp(value: number | null, min: number, max: number): number | null;
/**
* Hook to store a clamped value, derived from props.
*
* @param settings
* @return The controlled value and the value setter.
*/
export declare function useControlledRangeValue(settings: UseControlledRangeValueArgs): readonly [number | null, (nextValue: number | null) => void];
//# sourceMappingURL=utils.d.ts.map