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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user