@gin0606/react-stateless-input
v1.0.0
Published
`<Input />` Component for creating a stateless form
Downloads
1
Readme
react-stateless-input
<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>
);
}
}