easy-css-transform-builder
Version:
Easily build CSS transform values with JavaScript.
13 lines (12 loc) • 561 B
TypeScript
export declare type LengthUnit = 'em' | 'ex' | 'ch' | 'rem' | 'vh' | 'vw' | 'vmin' | 'vmax' | 'px' | 'mm' | 'q' | 'cm' | 'in' | 'pt' | 'pc';
export declare type AngleUnit = 'deg' | 'grad' | 'rad' | 'turn';
export interface Units {
length: LengthUnit;
angle: AngleUnit;
}
export declare type StyleScalarValue = number | string;
export declare type StyleValue = StyleScalarValue | StyleScalarValue[];
export interface Styles {
[key: string]: StyleValue;
}
export declare const createCSSTransformBuilder: (units?: Units) => (styles: Styles) => string;