@raona/components
Version:
React components used at Raona to work with SPFx
15 lines (14 loc) • 679 B
TypeScript
/// <reference types="react" />
import { FormFieldType } from './FormFieldType';
import { Schema } from 'yup';
import { IDropdownOption } from 'office-ui-fabric-react/lib/components/Dropdown/Dropdown.types';
import { TypedHash } from '@raona/sp/dist/entities/TypedHash';
export interface FormField {
name?: string | JSX.Element;
id: string;
type: FormFieldType;
renderer?(id: string, values: TypedHash<any>, setValues: (key: string, object: any, dropdownOpt?: IDropdownOption[]) => void, setFieldValue: (field: string, value: any) => void, errors: string[]): JSX.Element;
validation?: Schema<any>;
compProps?: any;
initialValue?: any;
}