@open-tender/utils
Version:
A library of utils for use with Open Tender applications that utilize our cloud-based Order API.
28 lines (27 loc) • 1.08 kB
TypeScript
import { AppTheme, ThemeLayout, Theme, ThemeBottomTabs } from '@open-tender/types';
export declare const makeLineHeight: (lineHeight?: string, fontSize?: string) => string;
export declare const remsToPixels: (rems?: string, responsive?: boolean) => string;
export declare const remsToNumber: (rems: string) => number;
export declare const objRemsToPixels: <T extends Partial<ThemeLayout & {
big: string;
small: string;
giga: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h6: string;
main: string;
mega: string;
tera: string;
xBig: string;
xSmall: string;
xxBig: string;
xxSmall: string;
}>>(object: T, responsive?: boolean) => Partial<T>;
export declare const pixelsToInt: (pixels: string) => number;
export declare const pixelsToFloat: (pixels: string) => number;
export declare const makeBottomTabs: (bottomTabs: ThemeBottomTabs) => ThemeBottomTabs;
export declare const decorateTheme: (theme: Theme) => AppTheme;
export declare const hexToRgbA: (hex: string, opacity: number) => string | null;