mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Fix GH-21: toggle dropdown when clicking Sign in
This commit is contained in:
parent
4e38c1a050
commit
3d7f5ee66b
1 changed files with 5 additions and 2 deletions
|
@ -36,7 +36,7 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
handleLoginClick: function (e) {
|
handleLoginClick: function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.setState({'loginOpen': true});
|
this.setState({'loginOpen': !this.state.loginOpen});
|
||||||
},
|
},
|
||||||
closeLogin: function () {
|
closeLogin: function () {
|
||||||
this.setState({'loginOpen': false});
|
this.setState({'loginOpen': false});
|
||||||
|
@ -129,7 +129,10 @@ module.exports = React.createClass({
|
||||||
] : [
|
] : [
|
||||||
<li className="link right join" key="join"><a href="/join">Join Scratch</a></li>,
|
<li className="link right join" key="join"><a href="/join">Join Scratch</a></li>,
|
||||||
<li className="link right" key="login">
|
<li className="link right" key="login">
|
||||||
<a href="#" onClick={this.handleLoginClick}>Sign In</a>
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={this.handleLoginClick}
|
||||||
|
className="ignore-react-onclickoutside">Sign In</a>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
className="login-dropdown with-arrow"
|
className="login-dropdown with-arrow"
|
||||||
isOpen={this.state.loginOpen}
|
isOpen={this.state.loginOpen}
|
||||||
|
|
Loading…
Reference in a new issue