import React from 'react'; import './input.css' import Iconsvg from '../../Ui/Icon/Icon' type Props = { label?: string, id:string, name: string, value:string; type: 'text' | 'email' | 'search' | 'url' | 'number', placeholder?: string, disable?: boolean, readonly?: boolean, helperText?: string, error?: boolean, errorMessage?: string, icon?:boolean, iconPostions?: string, size?: 'default' | 'small' | 'medium' | 'large', borderRadious?: 'small' | 'medium' | 'large', variant?: 'default' |'primary' | 'secondary', iconName?:any, handleChange: (event: React.ChangeEvent) => void; } const InputField = (props: Props) => { const {label, id, name, type, value, placeholder, disable, readonly,helperText,error,errorMessage,iconName, size,icon,iconPostions,variant,borderRadious, handleChange} = props; const style = { paddingLeft: (icon && iconPostions == 'left') ? '40px' : '16px', paddingRight: (icon && iconPostions == 'right') ? '40px' : '16px' } return (
{(icon && iconPostions == 'left') ? : ''} {(icon && iconPostions == 'right') ? : ''}
{(error && errorMessage) &&

{errorMessage}

} {(!error && helperText) &&

{helperText}

}
) }; export default InputField;