react-data-entry
Version:
React data entry components library
57 lines (56 loc) • 1.98 kB
TypeScript
import React from "react";
import "./styles.css";
import CTextfield from "./textfield";
import CInputNumber from "./input-number";
import CTextarea from "./textarea";
import CPassword from "./password";
import CSwitch from "./switch";
import CCalendar from "./calendar";
import CSelector from "./selector";
import CCurrency from "./currency";
import CEditor from "./editor";
import CUpload from "./upload";
import CRadio from "./radio";
import CLink from "./link";
import CTime from "./time";
import CColorPicker from "./color-picker";
import CRangeCalendar from "./rang-calendar";
export type RenderDataEntryType = "text" | "number" | "date" | "select" | "textarea" | "password" | "radio" | "time" | "switch" | "currency" | "editor" | "upload" | "range-date" | "color";
export type KeyEditType = {
type: RenderDataEntryType;
label: string;
key: string;
role: any[] | null;
width?: string;
placeholder?: string;
direction?: "row" | "column";
labelWidth?: string;
rules?: any;
max?: number;
min?: number;
min_date?: string;
max_date?: string;
suffix?: string;
type_select?: "multiple" | "single";
type_text?: "text" | "number";
options?: any[];
uploadImage?: any;
length_img?: number;
disabled?: boolean;
defaultValue?: any;
picker?: "week" | "month" | "year" | "quarter";
formatCalendar?: string;
};
export type DataEntryProps = {
data: KeyEditType;
hookForm: {
control: any;
[key: string]: any;
};
disabled?: boolean;
size?: "large" | "middle" | "small";
customOnChange?: (e: any) => void;
};
declare const RenderDataEntry: React.MemoExoticComponent<(props: DataEntryProps) => import("react/jsx-runtime").JSX.Element | null>;
export { RenderDataEntry, CTextfield, CInputNumber, CTextarea, CPassword, CSwitch, CCalendar, CSelector, CCurrency, CEditor, CUpload, CRadio, CLink, CTime, CColorPicker, CRangeCalendar, };
export default RenderDataEntry;