@fyresite/react-textinput

Barebones React text input component

Stats

StarsIssuesVersionUpdatedCreatedSize
@fyresite/react-textinput
000.11.04 years ago4 years agoMinified + gzip package size for @fyresite/react-textinput in KB

Readme

react-textinput

Base TextInput React Component built for internal Fyresite use.

Installation

npm install --save-dev @fyresite/react-textinput

Usage

import React, { Component } from 'react';
import TextInput from '@fyresite/react-textinput';

class Example extends Component {
  constructor(props) {
    super(props);
    
    this.state = {
      textInput: ''
    };
  }
  
  handleChange(field, e) {
    this.setState((prevState, props) => {
      return {
        [field]: e.target.value
      };
    });
  }
  
  render() {
    return (
      <TextInput
        onChange={this.handleChange.bind(this, 'textInput')}
        value={this.state.textInput} />
    );
  }
}

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.