Merge pull request #4669 from tarikhamilton/knobs/number-proptypes-bug

Fix PropTypes in addons/knobs NumberType
This commit is contained in:
Igor 2018-11-05 18:50:59 +02:00 committed by GitHub
commit cbda39cadf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ class NumberType extends React.Component {
NumberType.propTypes = {
knob: PropTypes.shape({
name: PropTypes.string,
value: PropTypes.number,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
range: PropTypes.bool,
min: PropTypes.number,
max: PropTypes.number,