diff --git a/src/components/UIShell/Link.js b/src/components/UIShell/Link.js index e862ca7601f6..38feff873ccb 100644 --- a/src/components/UIShell/Link.js +++ b/src/components/UIShell/Link.js @@ -24,11 +24,7 @@ const LinkPropTypes = { * The base element to use to build the link. Defaults to `a`, can also accept * alternative tag names or custom components like `Link` from `react-router`. */ - element: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.node, - PropTypes.func, - ]), + element: PropTypes.elementType, }; Link.displayName = 'Link'; diff --git a/src/components/UIShell/SideNavMenu.js b/src/components/UIShell/SideNavMenu.js index 60ec28a81e3d..306175e9f5bf 100644 --- a/src/components/UIShell/SideNavMenu.js +++ b/src/components/UIShell/SideNavMenu.js @@ -29,7 +29,7 @@ export class SideNavMenu extends React.Component { /** * Pass in a custom icon to render next to the `SideNavMenu` title */ - icon: PropTypes.node.isRequired, + icon: PropTypes.node, /** * Specify whether the `SideNavMenu` is "active". `SideNavMenu` should be @@ -90,7 +90,7 @@ export class SideNavMenu extends React.Component { onClick={this.handleToggleExpand} ref={buttonRef} type="button"> - {icon} + {icon && {icon}} {title}