Skip to content

Commit 41781df

Browse files
committed
fix: add onClick to NavbarMenuItem
1 parent 1418c82 commit 41781df

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/tiger-san/src/navbar/navbar-menu-item.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React from 'react'
22
import PropTypes from 'prop-types'
33

4-
export const NavbarMenuItem = ({ children, href }) => (
4+
export const NavbarMenuItem = ({ children, href, onClick }) => (
55
<li role="none" className="navbar__item">
66
<a
77
role="menuitem"
88
href={href}
99
className="navbar__item navbar__item--link"
10+
onClick={onClick}
1011
>
1112
{children}
1213
</a>
@@ -20,5 +21,6 @@ NavbarMenuItem.propTypes = {
2021
PropTypes.elementType,
2122
PropTypes.func
2223
]).isRequired,
23-
href: PropTypes.string.isRequired
24+
href: PropTypes.string.isRequired,
25+
onClick: PropTypes.func
2426
}

0 commit comments

Comments
 (0)