mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-20 20:00:33 +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') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
Component.propTypes = {
|
Component.propTypes = {
|
||||||
container: PropTypes.node,
|
container: PropTypes.oneOfType([
|
||||||
|
PropTypes.node,
|
||||||
|
PropTypes.element,
|
||||||
|
PropTypes.elementType,
|
||||||
|
]),
|
||||||
children: PropTypes.node.isRequired,
|
children: PropTypes.node.isRequired,
|
||||||
plugins: PropTypes.arrayOf(PropTypes.func),
|
plugins: PropTypes.arrayOf(PropTypes.func),
|
||||||
componentProps: PropTypes.shape({
|
componentProps: PropTypes.shape({
|
||||||
|
|||||||
Reference in New Issue
Block a user