[Ivan Diaz] - Add props to Input component
This commit is contained in:
parent
39a9b051e0
commit
7e99487f28
|
@ -2,6 +2,18 @@ import React from 'react';
|
|||
|
||||
var Input = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
value: React.PropTypes.string,
|
||||
validation: React.PropTypes.func,
|
||||
onChange: React.PropTypes.func
|
||||
},
|
||||
|
||||
getDefaultProps() {
|
||||
return {
|
||||
value: ''
|
||||
};
|
||||
},
|
||||
|
||||
render() {
|
||||
return (
|
||||
<input {...this.getProps()} />
|
||||
|
|
Loading…
Reference in New Issue