diff --git a/src/js/input.jsx b/src/js/input.jsx index db12efe4807c62..fc59b21615820e 100644 --- a/src/js/input.jsx +++ b/src/js/input.jsx @@ -8,6 +8,8 @@ var Input = React.createClass({ propTypes: { multiline: React.PropTypes.bool, required: React.PropTypes.bool, + inlinePlaceholder: React.PropTypes.bool, + rows: React.PropTypes.number, min: React.PropTypes.number, max: React.PropTypes.number, step: React.PropTypes.number, @@ -25,7 +27,7 @@ var Input = React.createClass({ getInitialState: function() { return { value: this.props.defaultValue, - rows: 1 + rows: this.props.rows }; }, @@ -51,22 +53,24 @@ var Input = React.createClass({ 'mui-text': this.props.type === 'text', 'mui-error': this.props.error !== undefined && this.props.error !== null }), + placeholder = this.props.inlinePlaceholder ? this.props.placeholder : "", inputElement = this.props.multiline ? - this.props.valueLink ? - : - : - this.props.valueLink ? - : - ; + this.props.valueLink ? + : + : + this.props.valueLink ? + : + + placeholderSpan = this.props.inlinePlaceholder ? null : {this.props.placeholder}; return (