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.

32 lines (29 loc) 850 B
import React from 'react' import { LoadOptions } from '../Autocomplete' export 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 }