@teamsparta/stack-flex
Version:
stack flex
13 lines (10 loc) • 1.04 kB
TypeScript
import { SerializedStyles } from '@emotion/react';
import { BreakpointValueMap } from '@teamsparta/stack-core';
type CSSPropertyValue = string | number | boolean | undefined;
type CSSPropertyTransformer<T = CSSPropertyValue> = (value: T) => string | number | undefined;
declare const createResponsiveCssFunction: <T extends CSSPropertyValue>(cssProperty: string, transformer?: CSSPropertyTransformer<T> | undefined) => (values?: BreakpointValueMap<T>[] | undefined) => SerializedStyles[];
declare const booleanToCssValue: (value: boolean, trueValue: string, falseValue?: string) => string | undefined;
declare const pixelValueTransformer: CSSPropertyTransformer;
declare const stringValueTransformer: CSSPropertyTransformer<string>;
declare const booleanToPixelTransformer: (trueValue: string, falseValue?: string) => CSSPropertyTransformer<boolean>;
export { type CSSPropertyTransformer, type CSSPropertyValue, booleanToCssValue, booleanToPixelTransformer, createResponsiveCssFunction, pixelValueTransformer, stringValueTransformer };