pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
28 lines (27 loc) • 1.27 kB
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;
children?: React.ReactNode;
showForm?: boolean;
showDrawerButtons?: boolean;
handleCloseDrawer: () => void;
onFieldUpdate?: Record<string, DependentFieldUpdate[]>;
onFieldChange?: (fieldName: string, value: any) => void;
updateFieldOptions?: (field: string, options: Array<SelectOption | string>) => void;
updateFieldLabel?: (fieldName: string, newLabelName: string) => void;
setFieldHidden?: (fieldName: string, hidden: boolean) => void;
addField?: (fields: Field) => void;
updateFieldValidation?: (fieldName: string, newValidation: ValidationRule) => void;
processInitialFieldUpdates?: (getValues: (name?: string) => any) => Promise<void>;
processingDependencyRef?: React.MutableRefObject<boolean>;
pendingUpdatesRef?: React.MutableRefObject<Map<string, any>>;
persistenceKey?: string;
}
declare const DrawerContent: React.FC<DrawerContentProps>;
export default DrawerContent;