UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

56 lines (55 loc) 1.39 kB
import { CustomFieldData } from "@etsoo/appscript"; import React from "react"; import { GridProps } from "@mui/material/Grid"; /** * Custom field window props * 自定义字段窗口属性 */ export type CustomFieldWindowProps<D extends CustomFieldData> = { /** * Children creation callback * 子元素创建回调 * @param open Open callback * @param label Label * @param pc Property count * @returns Component */ children: (open: (customFields: D[], jsonData?: unknown) => void, label: string | undefined, pc: number) => React.ReactNode; /** * Label * 标签 */ label?: string; /** * Grid props * 网格属性 */ gridProps?: GridProps; /** * JSON data * JSON 数据 */ jsonData?: unknown; /** * Input name * 输入框名称 */ inputName?: string; /** * Input ref * 输入框引用 */ inputRef?: React.MutableRefObject<HTMLInputElement | null>; /** * On update callback * 更新回调 */ onUpdate?: (data: Record<string, unknown>) => void; }; /** * Custom field window * 自定义字段窗口 * @param props Props * @returns Component */ export declare function CustomFieldWindow<D extends CustomFieldData = CustomFieldData>(props: CustomFieldWindowProps<D>): import("react/jsx-runtime").JSX.Element;