Unify proptypes in util/proptypes.js (#3728)
* Unify proptypes in util/proptypes.js * Add missing use of nodeOrStringProptype
This commit is contained in:
@@ -16,6 +16,16 @@
|
||||
|
||||
import { PropTypes } from 'react';
|
||||
|
||||
export default function nullableProptype (type) {
|
||||
return PropTypes.oneOfType([ PropTypes.oneOf([ null ]), type ]);
|
||||
export function nullableProptype (type) {
|
||||
return PropTypes.oneOfType([
|
||||
PropTypes.oneOf([ null ]),
|
||||
type
|
||||
]);
|
||||
}
|
||||
|
||||
export function nodeOrStringProptype () {
|
||||
return PropTypes.oneOfType([
|
||||
PropTypes.node,
|
||||
PropTypes.string
|
||||
]);
|
||||
}
|
||||
Reference in New Issue
Block a user