style-dictionary-utils
Version:
Utilities to use in your style dictionary config
13 lines (12 loc) • 512 B
TypeScript
import { PlatformConfig, Transform } from 'style-dictionary/types';
export type DimensionTokenValue = {
value: number;
unit: string;
};
export declare const dimensionValueTransformer: (dimensionTokenValue: DimensionTokenValue | string, platform: PlatformConfig | undefined) => string;
/**
* dimension
* @description convert all dimensions that use pixel value to rem, uses `platform.options.basePxFontSize`
* as the base font, or `16` if not provided
*/
export declare const dimensionCss: Transform;