style-dictionary-utils
Version:
Utilities to use in your style dictionary config
18 lines (17 loc) • 680 B
TypeScript
import { Transform } from 'style-dictionary/types';
/**
* Acceptable font weights according to w3c standard
* @link https://design-tokens.github.io/community-group/format/#font-weight
*/
declare const fontWeights: {
[key: string]: number;
};
export type FontWeightString = keyof typeof fontWeights;
export type FontWeightNumeric = (typeof fontWeights)[FontWeightString];
export declare const fontWeightValueTransformer: (tokenValue: FontWeightNumeric | FontWeightString) => FontWeightNumeric;
/**
* fontWeightCss
* @description convert a fontWeight string like `black` to the corresponding number, like `900`
*/
export declare const fontWeightCss: Transform;
export {};