@standard-forms/cdk
Version:
Interfaces, types and classes utilities for @standard-forms.
19 lines (14 loc) • 417 B
text/typescript
export interface FormItemValidator {
name: string;
fn: (value: any) => string;
}
export interface FormItemProps {
name: string;
label: string;
disabled?: boolean;
validators?: FormItemValidator[];
required?: boolean;
}
export type FormItemValueWatcher = (value: any) => void;
export type FormItemErrors = Record<string, string>;
export type FormItemTexts = {label: string} & Record<string, string>;