@hhgtech/hhg-components
Version:
Hello Health Group common components
25 lines (24 loc) • 1.31 kB
TypeScript
import React, { InputHTMLAttributes } from 'react';
export type CustomInputProps = {
size: 'lg' | 'md' | 'sm';
autoComplete?: 'on' | 'off';
onChange?: (v: string) => void;
errorMessage?: string;
actionIcon?: JSX.Element;
onActionClick?: () => void;
isDeleteAction?: boolean;
displayIcon?: JSX.Element;
label?: string | JSX.Element;
isDisabled?: boolean;
CustomInput?: JSX.Element;
type?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search' | 'number';
isNumerousKeyboard?: boolean;
enterKeyHint?: React.InputHTMLAttributes<HTMLInputElement>['enterKeyHint'];
nativeOnChange?: React.ChangeEventHandler<HTMLInputElement>;
};
export type Props = Omit<React.DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'size' | 'autoComplete' | 'type' | 'onChange' | 'enterKeyHint' | 'ref'> & CustomInputProps;
/**
* @deprecated Consider to use at '@hhgtech/hhg-components/mantine'
*/
declare const PureInput: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint" | "autoComplete" | "size" | "type" | "onChange" | "ref"> & CustomInputProps & React.RefAttributes<HTMLInputElement>>;
export { PureInput };