@wordpress/components
Version:
UI components for WordPress.
27 lines • 1.03 kB
TypeScript
import type { CSSProperties } from 'react';
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 [Exclude<number | "" | null, ''>, (nextValue: number | null) => void];
/**
* Resolve CSS-wide keyword spellings for the private color classes without
* changing the original color value passed to the stylesheet.
*
* @param value The CSS color value.
*/
export declare function getCSSWideKeyword(value: CSSProperties['color']): string | undefined;
//# sourceMappingURL=utils.d.ts.map