* fixes #525

On clicking on the links itself, the menu can be closed.

* fixes #525

Account click added.
This commit is contained in:
Himanshu 2018-02-21 01:02:09 +05:30 committed by Cassie Tarakajian
parent e70b9d618e
commit 074e654b64

View file

@ -99,10 +99,13 @@ class Nav extends React.PureComponent {
<InlineSVG className="nav__item-header-triangle" src={triangleUrl} /> <InlineSVG className="nav__item-header-triangle" src={triangleUrl} />
</button> </button>
<ul className="nav__dropdown"> <ul className="nav__dropdown">
<li className="nav__dropdown-heading"> <button
onClick={this.toggleDropdown.bind(this, 'file')}
className="nav__dropdown-heading"
>
<span>File</span> <span>File</span>
<InlineSVG src={triangleUrl} /> <InlineSVG src={triangleUrl} />
</li> </button>
<li className="nav__dropdown-item"> <li className="nav__dropdown-item">
<button <button
onClick={() => { onClick={() => {
@ -210,10 +213,13 @@ class Nav extends React.PureComponent {
<InlineSVG className="nav__item-header-triangle" src={triangleUrl} /> <InlineSVG className="nav__item-header-triangle" src={triangleUrl} />
</button> </button>
<ul className="nav__dropdown"> <ul className="nav__dropdown">
<li className="nav__dropdown-heading"> <button
onClick={this.toggleDropdown.bind(this, 'edit')}
className="nav__dropdown-heading"
>
<span>Edit</span> <span>Edit</span>
<InlineSVG src={triangleUrl} /> <InlineSVG src={triangleUrl} />
</li> </button>
<li className="nav__dropdown-item"> <li className="nav__dropdown-item">
<button <button
onClick={() => { onClick={() => {
@ -278,10 +284,13 @@ class Nav extends React.PureComponent {
<InlineSVG className="nav__item-header-triangle" src={triangleUrl} /> <InlineSVG className="nav__item-header-triangle" src={triangleUrl} />
</button> </button>
<ul className="nav__dropdown"> <ul className="nav__dropdown">
<li className="nav__dropdown-heading"> <button
onClick={this.toggleDropdown.bind(this, 'sketch')}
className="nav__dropdown-heading"
>
<span>Sketch</span> <span>Sketch</span>
<InlineSVG src={triangleUrl} /> <InlineSVG src={triangleUrl} />
</li> </button>
<li className="nav__dropdown-item"> <li className="nav__dropdown-item">
<button <button
onClick={() => { onClick={() => {
@ -346,10 +355,13 @@ class Nav extends React.PureComponent {
<InlineSVG className="nav__item-header-triangle" src={triangleUrl} /> <InlineSVG className="nav__item-header-triangle" src={triangleUrl} />
</button> </button>
<ul className="nav__dropdown"> <ul className="nav__dropdown">
<li className="nav__dropdown-heading"> <button
onClick={this.toggleDropdown.bind(this, 'help')}
className="nav__dropdown-heading"
>
<span>Help & Feedback</span> <span>Help & Feedback</span>
<InlineSVG src={triangleUrl} /> <InlineSVG src={triangleUrl} />
</li> </button>
<li className="nav__dropdown-item"> <li className="nav__dropdown-item">
<button <button
onClick={() => { onClick={() => {
@ -420,10 +432,13 @@ class Nav extends React.PureComponent {
</button> </button>
<InlineSVG className="nav__item-header-triangle" src={triangleUrl} /> <InlineSVG className="nav__item-header-triangle" src={triangleUrl} />
<ul className="nav__dropdown"> <ul className="nav__dropdown">
<li className="nav__dropdown-heading"> <button
onClick={this.toggleDropdown.bind(this, 'account')}
className="nav__dropdown-heading"
>
<span>My Account</span> <span>My Account</span>
<InlineSVG src={triangleUrl} /> <InlineSVG src={triangleUrl} />
</li> </button>
<li className="nav__dropdown-item"> <li className="nav__dropdown-item">
<Link <Link
to={`/${this.props.user.username}/sketches`} to={`/${this.props.user.username}/sketches`}