react-fblibrary
Version:
FBLibrary é uma biblioteca autoral que reúne componentes e bases fundamentais para desenvolvimento eficiente. Nosso objetivo é criar um ecossistema de componentes, desde elementos simples, como inputs e botões, até layouts completos, que podem ser reutili
48 lines (39 loc) • 925 B
text/typescript
import { FormInstance } from "antd/lib/form";
export type Field = {
name: string;
label?: string;
type?: string;
placeholder?: string;
optionsFunction?: () => any;
style?: any;
doublelines?: Field[];
rules?: any[];
required?: boolean;
};
export type TabContent = {
fields: Field[];
contentLabel: string;
currentItem?: any;
name : string
}
export type TabContents = {
[key: number] : TabContent
}
export type FormData = {
[key: string]: string;
};
export interface MultiModalProps {
dynamicModals: TabContent[];
pageTitle?: string;
handleSaveData: (data: FormInstance<FormData>) => void;
closeModal: (form: any) => void;
}
export type ModalProps = {
closeModal: (form: any) => void;
onSave: (data: any) => void;
fields: Field[];
contentLabel: string;
currentItem?: any;
onCancelText?: string;
onSaveText?: string;
};