@easykit/design
Version:
Easy kit design components
12 lines (11 loc) • 535 B
TypeScript
import { FC, PropsWithChildren } from 'react';
export type Formatters = ([string, any[]] | string)[];
export type FunctionMap = Record<string, (value: any, ...args: any[]) => any>;
export declare const register: (handles: FunctionMap) => void;
export declare const formatValue: (v: any, formatters: Formatters, all?: FunctionMap) => any;
export interface ValueFormatterProps extends PropsWithChildren {
value?: any;
formatters?: any[];
handles?: FunctionMap;
}
export declare const ValueFormatter: FC<ValueFormatterProps>;