@smart-react-components/ui
Version:
SRC UI includes React and Styled components.
14 lines (13 loc) • 581 B
TypeScript
import { Value } from '@smart-react-components/core/types';
/**
* Takes a CSS number value as JavaScript string or number.
* Extracts the unit and returns the number part of the value.
*/
export declare const extractNumberUnit: (input: Value) => number;
/**
* Takes a CSS number as JavaScript string or number.
* Splits the given input in two as value and unit parts.
* Provides a callback with value of the input.
* Returns the returned value from the callback along with unit of the input.
*/
export declare const toCSSValue: (input: Value) => (callback: any) => string;