-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed3653e
commit 150bef9
Showing
12 changed files
with
77 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
import React from 'react'; | ||
|
||
var Switch = React.createClass({ | ||
render: function() { | ||
return <div className="switch"> | ||
<input id="uskin-1" type="checkbox" /> | ||
<label htmlFor="uskin-1" className="switch-inner"></label> | ||
</div> | ||
class Switch extends React.Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
|
||
this.clickHandler = this.clickHandler.bind(this); | ||
} | ||
|
||
clickHandler(e) { | ||
this.props.onClick && this.props.onClick.call(this, e); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className="switch"> | ||
<input id="uskin-1" type="checkbox" /> | ||
<label htmlFor="uskin-1" className="switch-inner" onClick={this.clickHandler}></label> | ||
</div> | ||
) | ||
} | ||
}); | ||
} | ||
|
||
export default Switch; |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters