@fyresite/react-textinput

0.11.0 • Public • Published

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} />
    );
  }
}

/@fyresite/react-textinput/

    Package Sidebar

    Install

    npm i @fyresite/react-textinput

    Weekly Downloads

    1

    Version

    0.11.0

    License

    ISC

    Last publish

    Collaborators

    • mtstrong
    • storr
    • fyredave
    • dellybro
    • fyreman
    • paulfyre
    • yenhunglai