Open
Description
In the following components:
CTA
Card
FormLayout
Media
Tabs
we validate the children
prop with:
children: PropTypes.oneOfType([
PropTypes.element,
PropTypes.arrayOf(PropTypes.element),
]).isRequired,
This is too strict, because it fails when false
is passed in. This is common with idomatic code such as:
<CTA>
{condition && <CTAStart />}
</CTA>
We should probably use children: PropTypes.node.isRequired
to revert it to the state before #301 was merged.
Since propType validation is off in production builds, this has no effect on production code.