UNPKG

652 BTypeScriptView Raw
1import { LengthObject } from "../interfaces";
2/**
3 * If size is a number, append px to the value as default unit.
4 * If size is a string, validate against list of valid units.
5 * If unit is valid, return size as is.
6 * If unit is invalid, console warn issue, replace with px as the unit.
7 *
8 * @param {(number | string)} size
9 * @return {LengthObject} LengthObject
10 */
11export declare function parseLengthAndUnit(size: number | string): LengthObject;
12/**
13 * Take value as an input and return valid css value
14 *
15 * @param {(number | string)} value
16 * @return {string} valid css value
17 */
18export declare function cssValue(value: number | string): string;