@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
37 lines (36 loc) • 1.07 kB
TypeScript
import React from 'react';
import type { Field } from '../../form-engine';
import type { DataItem } from './DetailsCard';
interface FormEngineConfig {
title: string;
isOpen: boolean;
onClose: () => void;
onSubmit: (data: any) => Promise<void>;
fields: Field[];
initialValues: Record<string, any>;
submitButtonText: string;
marginTop?: string;
drawerKey?: string;
persistenceKey?: string;
onFieldChange?: (fieldName: string, value: any) => void;
onFieldUpdate?: Record<string, any[]>;
children?: React.ReactNode;
}
export interface DetailsPageProps {
id: string;
parentId?: string;
title: string;
loading: boolean;
detailsData: DataItem[];
canEdit?: boolean;
onEdit?: () => void;
editButtonText?: string;
actionContent?: React.ReactNode;
entityName?: string;
parentEntityName?: string;
formEngineConfig?: FormEngineConfig;
tabComponent?: React.ComponentType<any>;
tabProps?: any;
}
declare const DetailsPage: React.FC<DetailsPageProps>;
export default DetailsPage;