Skip to content

Commit

Permalink
Merge pull request #4 from mwq27/master
Browse files Browse the repository at this point in the history
Added an onChange property to the Input component.  This will be the nam...
  • Loading branch information
Hai Nguyen committed Oct 15, 2014
2 parents 3747c9d + 7f2695f commit b471123
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/js/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ var Input = React.createClass({
description: React.PropTypes.string,
placeholder: React.PropTypes.string,
type: React.PropTypes.string.isRequired,
name: React.PropTypes.string.isRequired
name: React.PropTypes.string.isRequired,
onChange: React.PropTypes.func
},

mixins: [Classable],
Expand Down Expand Up @@ -74,7 +75,7 @@ var Input = React.createClass({
case false:
return (
<div className={classes}>
<input type={this.props.type} name={this.props.name} required />
<input type={this.props.type} name={this.props.name} onChange={this.props.onChange} required />
<span className="mui-input-placeholder">
{this.props.placeholder}
</span>
Expand Down

0 comments on commit b471123

Please sign in to comment.