material-ui
Advanced tools
Comparing version 0.1.22 to 0.1.23
@@ -53,3 +53,3 @@ /** | ||
<div className="mui-menu-control" onClick={this._onControlClick}> | ||
<Paper className="mui-menu-control-bg" /> | ||
<Paper className="mui-menu-control-bg"zDepth="0" /> | ||
<div className="mui-menu-label"> | ||
@@ -56,0 +56,0 @@ {this.props.menuItems[this.state.selectedIndex].text} |
@@ -13,3 +13,3 @@ /** | ||
multiline: React.PropTypes.bool, | ||
style: React.PropTypes.string, | ||
inputStyle: React.PropTypes.string, | ||
error: React.PropTypes.string, | ||
@@ -20,3 +20,4 @@ label: React.PropTypes.string, | ||
type: React.PropTypes.string.isRequired, | ||
name: React.PropTypes.string.isRequired | ||
name: React.PropTypes.string.isRequired, | ||
onChange: React.PropTypes.func | ||
}, | ||
@@ -51,49 +52,20 @@ | ||
var classes = this.getClasses('mui-input', { | ||
'mui-floating': this.props.style === 'floating', | ||
'mui-text': this.props.type === 'text', | ||
'mui-error': this.state.error === true | ||
}) | ||
'mui-floating': this.props.inputStyle === 'floating', | ||
'mui-text': this.props.type === 'text', | ||
'mui-error': this.state.error === true | ||
}), | ||
inputElement = this.props.multiline ? | ||
<textarea className="mui-input-textarea" rows={this.state.rows} onChange={this._onLineBreak} required /> : | ||
<input type={this.props.type} name={this.props.name} onChange={this.props.onChange} required />; | ||
switch(this.props.multiline) { | ||
case true: | ||
return ( | ||
<div className={classes}> | ||
<textarea className="mui-input-textarea" rows={this.state.rows} onChange={this._onLineBreak} required /> | ||
<span className="mui-input-placeholder"> | ||
{this.props.placeholder} | ||
</span> | ||
<span className="mui-input-highlight"> | ||
</span> | ||
<span className="mui-input-bar"> | ||
</span> | ||
<span className="mui-input-description"> | ||
{this.props.description} | ||
</span> | ||
<span className="mui-input-error"> | ||
{this.props.error} | ||
</span> | ||
</div> | ||
); | ||
case false: | ||
return ( | ||
<div className={classes}> | ||
<input type={this.props.type} name={this.props.name} required /> | ||
<span className="mui-input-placeholder"> | ||
{this.props.placeholder} | ||
</span> | ||
<span className="mui-input-highlight"> | ||
</span> | ||
<span className="mui-input-bar"> | ||
</span> | ||
<span className="mui-input-description"> | ||
{this.props.description} | ||
</span> | ||
<span className="mui-input-error"> | ||
{this.props.error} | ||
</span> | ||
</div> | ||
); | ||
} | ||
return ( | ||
<div ref={this.props.ref} className={classes}> | ||
{inputElement} | ||
<span className="mui-input-placeholder">{this.props.placeholder}</span> | ||
<span className="mui-input-highlight"></span> | ||
<span className="mui-input-bar"></span> | ||
<span className="mui-input-description">{this.props.description}</span> | ||
<span className="mui-input-error">{this.props.error}</span> | ||
</div> | ||
); | ||
}, | ||
@@ -110,6 +82,6 @@ | ||
} | ||
}, | ||
} | ||
}); | ||
module.exports = Input; | ||
module.exports = Input; |
@@ -11,2 +11,3 @@ /** | ||
Types = { | ||
LINK: 'LINK', | ||
SUBHEADER: 'SUBHEADER', | ||
@@ -13,0 +14,0 @@ NESTED: 'NESTED' |
@@ -159,2 +159,8 @@ /** | ||
case MenuItem.Types.LINK: | ||
itemComponent = ( | ||
<a key={i} className="mui-menu-item" href={menuItem.payload}>{menuItem.text}</a> | ||
); | ||
break; | ||
case MenuItem.Types.SUBHEADER: | ||
@@ -161,0 +167,0 @@ itemComponent = ( |
{ | ||
"name": "material-ui", | ||
"author": "Call-em-all Engineering Team", | ||
"version": "0.1.22", | ||
"version": "0.1.23", | ||
"description": "Material Design UI components built with React", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
213233
76
2979