2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00

fix(react): adjust PropTypes for React Component container (#107)

Augments the existing PropType for the `container` prop of Component to allow for React elements and element types to be passed. The latter allows React Native to better be supported.
This commit is contained in:
Dan Polivy
2021-06-23 14:27:08 -07:00
committed by GitHub
parent b7e55a58df
commit 93d802773c
+5 -1
View File
@@ -18,7 +18,11 @@ const Component = ({
if (process.env.NODE_ENV !== 'production') {
Component.propTypes = {
container: PropTypes.node,
container: PropTypes.oneOfType([
PropTypes.node,
PropTypes.element,
PropTypes.elementType,
]),
children: PropTypes.node.isRequired,
plugins: PropTypes.arrayOf(PropTypes.func),
componentProps: PropTypes.shape({