@lemoneer-s.ariprasath/custom-input-field
v1.5.1
Published
This package is used to design input fields. Type of the input fields can be modified by passing appropriate props.
Downloads
2
Readme
This package is used to design input fields. Type of the input fields can be modified by passing appropriate props.
type(string)-->["text","email","password","number"] id(string)-->Unique id placeholder(string)--> Input field placeholder getValue(Call back function)-->a call back function which returns the input event. prefixIcons(image)-->an icon that will be visible before the label.
Example:
const inputValue = (event) => {
console.log(event)
}
return (<>
<CustomInputField type="number" id="number-field" placeholder="Mobile Number" getValue={inputValue} prefixIcon={FullNameIcons} label="Mobile number" />
<CustomInputField type="email" id="email-field" placeholder="Email" getValue={inputValue} prefixIcon={FullNameIcons} label="email" />
<CustomInputField type="text" id="text-field" placeholder="Name" getValue={inputValue} prefixIcon={FullNameIcons} label="Name" />
<CustomInputField type="password" id="password-field" placeholder="Password" getValue={inputValue} prefixIcon={FullNameIcons} label="Password" />
</>
);