phx-react
Version:
PHX REACT
28 lines (27 loc) • 1.01 kB
TypeScript
import React, { InputHTMLAttributes } from 'react';
import { UseFormRegisterReturn } from 'react-hook-form';
import { ComplexAction } from '../types';
import * as OutlineIcons from '@heroicons/react/24/outline';
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
className?: string;
label?: string;
helpText?: string;
register?: UseFormRegisterReturn;
registerSelect?: UseFormRegisterReturn;
error?: boolean;
errorMessageCustom?: string;
listOption?: Array<{
id: number;
name: string;
}>;
selected?: number;
disabled?: boolean;
errorType?: 'required-field' | 'validate-input-field' | 'duplicate-field' | 'validate-phone-number' | 'validate-input-email' | 'custom-message';
prefix?: string;
suffix?: string;
prefixIcon?: keyof typeof OutlineIcons;
suffixIcon?: keyof typeof OutlineIcons;
labelAction?: ComplexAction;
buttonAction?: ComplexAction;
}
export declare const PHXInput: React.FC<InputProps>;