Skip to content

Commit

Permalink
Adding click/tap event to the label to make it act more like a native…
Browse files Browse the repository at this point in the history
… <label>.
  • Loading branch information
mwq27 committed Jan 9, 2015
1 parent 5af9996 commit 5d2dd88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/toggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var Toggle = React.createClass({

return (
<div className="mui-toggle-wrap">
{this.props.label ? <div className="mui-toggle-label">{this.props.label}</div> : ''}
{this.props.label ? <div className="mui-toggle-label" onTouchTap={this._handleTouchTap}>{this.props.label}</div> : ''}
<div className={classes} onTouchTap={this._handleTouchTap}>
<div className="mui-toggle-track" />
<Paper className="mui-toggle-thumb" zDepth={1} />
Expand Down
1 change: 1 addition & 0 deletions src/less/components/toggle.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
display: inline-block;
font-style: italic;
padding-right: 10px;
cursor: pointer;
}
.mui-toggle {
position: relative;
Expand Down

0 comments on commit 5d2dd88

Please sign in to comment.