React PropTypes : Allow different types of PropTypes for one prop
For documentation purpose, it's better to list the string values that are legal:
size: PropTypes.oneOfType([
PropTypes.number,
PropTypes.oneOf([ 'SMALL', 'LARGE' ]),
]),
size: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number
]),
Learn more: Typechecking With PropTypes
This might work for you:
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),