Methods
-
childrenOfType(components)
-
Returns a propType checker that checks if the passed children are of one of the provided component types.
Parameters:
Name Type Description componentsArray An array of React components which are allowed
Example
MyComponent.propTypes = { children: childrenOfType([SomeComponent, SomeOtherComponent]), }