@crave/farmblocks-hoc-input

A High Order Component that adds behaviour of label support, different styles for focus and errors, and validation error messages.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@crave/farmblocks-hoc-input
20299.1.78 months ago5 years agoMinified + gzip package size for @crave/farmblocks-hoc-input in KB

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