pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
20 lines (19 loc) • 876 B
TypeScript
import React from 'react';
import type { DependentFieldUpdate, Field, SelectOption, ValidationRule } from '../../form-engine';
interface DrawerContentProps {
fields: Field[];
onSubmit: (data: any) => Promise<void>;
initialValues?: any;
isOpen?: boolean;
cancelButtonText?: string;
submitButtonText?: string;
handleCloseDrawer: () => void;
onFieldUpdate?: Record<string, DependentFieldUpdate[]>;
updateFieldOptions?: (field: string, options: Array<SelectOption | string>) => void;
updataFieldLabel?: (fieldName: string, newLabelName: string) => void;
setFieldHidden?: (fieldName: string, hidden: boolean) => void;
addField?: (fields: Field) => void;
updateFieldValidation?: (fieldName: string, newValidation: ValidationRule) => void;
}
declare const DrawerContent: React.FC<DrawerContentProps>;
export default DrawerContent;