@crave/farmblocks-hoc-input
v9.1.7
Published
A High Order Component that adds behaviour of label support, different styles for focus and errors, and validation error messages.
Downloads
136
Readme
Farmblocks Input HOC
A High Order Component that adds behaviour of label support, different styles for focus and errors, and validation error messages.
Installation
npm install @crave/farmblocks-hoc-input
Usage
import formInput from "@crave/farmblocks-hoc-input";
const FbInput = formInput(props => React.createElement("input", props));
const Form = () => <FbInput label="Label" placeholder="Helpful placeholder" />;
For more examples and details on the available props, read the docs.
License
MIT