Skip to content

Commit

Permalink
Fixed input click events. Corrected spacing on toolbars. Fixed alignm…
Browse files Browse the repository at this point in the history
…ent on buttons.
  • Loading branch information
Mark Ragunton committed Oct 24, 2014
1 parent ca9f10a commit 8d22551
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
10 changes: 7 additions & 3 deletions docs/dist/js/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ var Input = React.createClass({
}),
inputElement = this.props.multiline ?
<textarea value={this.state.value} className="mui-input-textarea" rows={this.state.rows} onChange={this._onTextAreaChange} required /> :
<input value={this.state.value} type={this.props.type} name={this.props.name} onChange={this._onInputChange} required />;
<input ref="input" value={this.state.value} type={this.props.type} name={this.props.name} onChange={this._onInputChange} required />;

return (
<div ref={this.props.ref} className={classes}>
{inputElement}
<span className="mui-input-placeholder">{this.props.placeholder}</span>
<span className="mui-input-placeholder" onClick={this._onPlaceholderClick}>{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>
Expand All @@ -85,6 +85,10 @@ var Input = React.createClass({
if (this.props.onChange) this.props.onChange(e, value);
},

_onPlaceholderClick: function(e) {
this.refs.input.getDOMNode().focus();
},

_onTextAreaChange: function(e) {
this._onInputChange(e);
this._onLineBreak();
Expand All @@ -103,4 +107,4 @@ var Input = React.createClass({

});

module.exports = Input;
module.exports = Input;
2 changes: 1 addition & 1 deletion docs/dist/less/components/drop-down-icon.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@icon-width: 40px;
@icon-width: 48px;

.mui-drop-down-icon {
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/less/components/icon.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
height: @icon-highlight-size;
background-color: rgba(0, 0, 0, .0);
position: absolute;
top: 10px;
top: 9px;
border-radius: 2px;
left: 18px;
transition: none;
Expand Down
4 changes: 2 additions & 2 deletions docs/dist/less/components/input.less
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
box-sizing: border-box;
padding-bottom: 14px;

&[type='text'] {
&[type='text'], &[type='password'] {
display: block;
width: @input-width;
}
Expand Down Expand Up @@ -156,7 +156,7 @@
color: gray;
position: absolute;
top: -4px;
z-index: -1;
//z-index: -1;
.ease-out;
}
}
Expand Down
1 change: 1 addition & 0 deletions docs/dist/less/components/paper-button.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

.mui-paper-button-content {
position: relative;
text-align: center;
}

.mui-paper-container {
Expand Down
6 changes: 5 additions & 1 deletion docs/dist/less/components/toolbar.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@toolbar-background-color: darken(#eeeeee, 5%);
@toolbar-height: 56px;
@toolbar-icon-color: rgba(0, 0, 0, .40);
@toolbar-separator-color: rgba(0, 0, 0, .11);
@toolbar-separator-color: rgba(0, 0, 0, .175);
@toolbar-menu-hover-color: rgba(0, 0, 0, .10);
@toolbar-menu-hover-color: @white;

Expand Down Expand Up @@ -96,6 +96,10 @@

&:first-child {
margin-left: -24px !important;

.mui-toolbar-title {
margin-left: 24px !important;
}
}
}

Expand Down

0 comments on commit 8d22551

Please sign in to comment.