From da8cd05737656579ac8cd42096126069aea12770 Mon Sep 17 00:00:00 2001 From: Igor Date: Mon, 5 Nov 2018 18:50:59 +0200 Subject: [PATCH] Merge pull request #4669 from tarikhamilton/knobs/number-proptypes-bug Fix PropTypes in addons/knobs NumberType --- addons/knobs/src/components/types/Number.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/knobs/src/components/types/Number.js b/addons/knobs/src/components/types/Number.js index e96d4deaf04c..a9237d6e7200 100644 --- a/addons/knobs/src/components/types/Number.js +++ b/addons/knobs/src/components/types/Number.js @@ -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,