Commit e04bfc60 authored by Robert Knight's avatar Robert Knight

Fix prop-types warning with conditionally-rendered menu content

Conditionally rendered items create boolean `false` entries in the
`children` prop when the condition is false.

To indicate that there are no special restrictions on the `children`
prop here beyond them being some kind of renderable content, I've opted
for the `any` prop type.
parent 5f4bcef9
......@@ -163,10 +163,7 @@ Menu.propTypes = {
* These are typically `MenuSection` and `MenuItem` components, but other
* custom content is also allowed.
*/
children: propTypes.oneOfType([
propTypes.object,
propTypes.arrayOf(propTypes.object),
]),
children: propTypes.any,
/**
* Additional CSS classes to apply to the menu.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment