GoScrobble/web/node_modules/react-spinners/helpers/unitConverter.d.ts

19 lines
652 B
TypeScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
import { LengthObject } from "../interfaces";
/**
* If size is a number, append px to the value as default unit.
* If size is a string, validate against list of valid units.
* If unit is valid, return size as is.
* If unit is invalid, console warn issue, replace with px as the unit.
*
* @param {(number | string)} size
* @return {LengthObject} LengthObject
*/
export declare function parseLengthAndUnit(size: number | string): LengthObject;
/**
* Take value as an input and return valid css value
*
* @param {(number | string)} value
* @return {string} valid css value
*/
export declare function cssValue(value: number | string): string;