UNPKG

@totalsoft/rocket-ui

Version:

A set of reusable and composable React components built on top of Material UI core for developing fast and friendly web applications interfaces.

30 lines (29 loc) 930 B
import React, { JSX } from 'react'; import { LoadOptions } from '../Autocomplete'; export declare enum ControlType { Text = "Text", Integer = "Integer", Numeric = "Numeric", Date = "Date", Checkbox = "Checkbox", Autocomplete = "Autocomplete", Custom = "Custom" } export type DynamicFieldProps<TCustomComponentProps extends object = any, TAutocompleteOptions = unknown> = { controlType: ControlType; id?: string; value?: unknown; label?: string; onChange?: (value: unknown) => void; options?: readonly TAutocompleteOptions[]; loadOptions?: LoadOptions<TAutocompleteOptions>; isPaginated?: boolean; error?: boolean; helperText?: React.ReactNode; required?: boolean; readOnly?: boolean; disabled?: boolean; CustomComponent?: (props: TCustomComponentProps) => JSX.Element; customComponentProps?: TCustomComponentProps; [key: string]: any; };