Created
October 6, 2016 12:06
-
-
Save zindel/fcd16317af555bcaf39c399e72bd0800 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
diff --git a/src/topNav/PrimaryMenu.js b/src/topNav/PrimaryMenu.js | |
index 57efdfd..0229aa9 100644 | |
--- a/src/topNav/PrimaryMenu.js | |
+++ b/src/topNav/PrimaryMenu.js | |
@@ -61,6 +61,7 @@ export class PrimaryMenu extends React.Component { | |
render() { | |
let { | |
children, | |
+ href, | |
items, | |
variant, | |
...props | |
@@ -69,9 +70,9 @@ export class PrimaryMenu extends React.Component { | |
return ( | |
<VBox | |
{...props} | |
- onMouseEnter={this.onMouseEnter} | |
- onMouseLeave={this.onMouseLeave}> | |
- <PrimaryButton variant={{...variant, open}}> | |
+ onMouseEnter={items.length ? this.onMouseEnter : null} | |
+ onMouseLeave={items.length ? this.onMouseLeave : null}> | |
+ <PrimaryButton variant={{...variant, open}} href={href}> | |
{children} | |
</PrimaryButton> | |
{open && |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment