1.0.0 • Published 9 years ago

@gin0606/react-stateless-input v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

react-stateless-input Build Status

<Input /> Component for creating a stateless form

Installation

npm install --save @gin0606/react-stateless-input

Usage

class FooForm extends React.Component {
  render() {
    return (
      <div className="form-horizontal">
        <div className="box-body">
          <div className="form-group">
            <span className="col-sm-5 control-label" htmlFor="FeedbackFormLabel">label</span>
            <div className="col-sm-7">
              <Input
                type="text"
                value={this.props.value}
                className="form-control"
                placeholder="input some text"
                onChange={(e) => {
                  this.props.onChangeValue(e.target.value);
                }}
              />
            </div>
          </div>
          <div className="box-footer">
            <button className="btn btn-primary pull-right" onClick={this.onSubmit}>
              Submit
            </button>
          </div>
        </div>
      </div>
    );
  }
}