UNPKG

@cmk/fe_utils

Version:
35 lines (33 loc) 1.54 kB
import { TypographyProps } from '@mui/material'; import { ReactNode } from 'react'; import { DefaultGenericValueType } from './AutoComplete'; import { GGenericInputFieldProps } from './GenericInputField'; import { InputFieldType } from './types'; type CommonClickTextFieldProps = { value: string; typographyProps?: TypographyProps; additionalLabelComponent?: ReactNode; onChange?: (newValue: string) => void; validateInput?: (newValue: string) => boolean; onClickAway?: () => void; handleRemoveItem?: () => void; onToggle?: (isEdit: boolean) => void; groupBy?: (option: Record<string, unknown>) => string; useChip?: boolean; deleteIcon?: string; deleteIconTooltip?: string; fullwidth?: boolean; disabled?: boolean; placeholder?: string; inputHelperText?: string; inputError?: boolean; }; export type ClickTextFieldProps<T extends InputFieldType = InputFieldType> = CommonClickTextFieldProps & { variant?: T; fieldProps?: GGenericInputFieldProps<T>; } & (T extends 'autocomplete' | 'select' | 'multiselect' ? { options: DefaultGenericValueType[]; } : object); export declare const ClickTextFieldComponent: <InputType extends InputFieldType = InputFieldType>(props: ClickTextFieldProps<InputType>) => import("react/jsx-runtime").JSX.Element; export declare const ClickTextField: import('react').MemoExoticComponent<(<InputType extends InputFieldType = InputFieldType>(props: ClickTextFieldProps<InputType>) => import("react/jsx-runtime").JSX.Element)>; export {};