UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

39 lines (38 loc) 1.1 kB
import { DataTypes } from "@etsoo/shared"; import { TypographyProps } from "@mui/material/Typography"; import React from "react"; import { InputFieldProps } from "./InputField"; type ItemType = DataTypes.IdLabelItem<string | number>; /** * InputField with tips properties */ export type InputTipFieldProps<T extends ItemType = ItemType> = InputFieldProps & { /** * Load data * @param value Duplicate test value */ loadData(value: string): Promise<[T[]?, string?]>; /** * Label props */ labelProps?: Omit<TypographyProps, "onClick">; /** * Custom item label * @param item List item data * @returns Result */ itemLabel?: (item: T) => React.ReactNode; /** * Custom render item * @param item List item data * @returns Result */ renderItem?: (item: T) => React.ReactNode; }; /** * InputField with tips * @param props Props * @returns Component */ export declare function InputTipField<T extends ItemType = ItemType>(props: InputTipFieldProps<T>): import("react/jsx-runtime").JSX.Element; export {};