Skip to content

Commit

Permalink
Adds PropTypes.elementType to is MenuItem prop (#731)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrischuck committed Feb 4, 2020
1 parent 28cb73b commit 6ab5642
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/menu/src/MenuItem.js
@@ -1,5 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import Box from 'ui-box'
import { Pane } from '../../layers'
import { Text } from '../../typography'
import { Icon } from '../../icon'
Expand All @@ -13,7 +14,7 @@ class MenuItem extends React.PureComponent {
* Element type to use for the menu item.
* For example: `<MenuItem is={ReactRouterLink}>...</MenuItem>`
*/
is: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,
is: Box.propTypes.is,

/**
* Function that is called on click and enter/space keypress.
Expand Down

0 comments on commit 6ab5642

Please sign in to comment.