How to use the PropTypes function from prop-types

Find comprehensive JavaScript prop-types.PropTypes code examples handpicked from public code repositorys.

100
101
102
103
104
105
106
107
108
109
110
  return CharacterCounter;
}(_react.Component);


exports.default = CharacterCounter;
CharacterCounter.propTypes = {
  value: _propTypes.PropTypes.string.isRequired,
  maxLength: _propTypes.PropTypes.number.isRequired,
  wrapperStyle: _propTypes.PropTypes.object,
  characterCounterStyle: _propTypes.PropTypes.object,
  overrideStyle: _propTypes.PropTypes.bool
fork icon1
star icon6
watch icon0

+ 4 other calls in file

182
183
184
185
186
187
188
}(_react.default.Component);
exports.LTileLayer = LTileLayer;
_defineProperty(LTileLayer, "contextType", MapContext);
_defineProperty(LTileLayer, "propTypes", {
  url: _propTypes.PropTypes.string.isRequired,
  options: _propTypes.PropTypes.any
});
fork icon0
star icon1
watch icon1

+ 17 other calls in file

42
43
44
45
46
47
48
49
50
51
  }]);
  return LMapOver;
}(_react.default.Component);
exports.LMapOver = LMapOver;
_defineProperty(LMapOver, "propTypes", {
  children: _propTypes.PropTypes.any
});
var LMapOverItem = /*#__PURE__*/function (_React$Component2) {
  _inherits(LMapOverItem, _React$Component2);
  var _super2 = _createSuper(LMapOverItem);
fork icon0
star icon1
watch icon1

+ 17 other calls in file

586
587
588
589
590
591
592
593
594
595
rightButtonsOpenReleaseAnimationConfig: _propTypes.PropTypes.object,
rightButtonsCloseReleaseAnimationFn: _propTypes.PropTypes.func,
rightButtonsCloseReleaseAnimationConfig: _propTypes.PropTypes.object,

// base swipe lifecycle
onSwipeStart: _propTypes.PropTypes.func,
onSwipeMove: _propTypes.PropTypes.func,
onSwipeRelease: _propTypes.PropTypes.func,
onSwipeComplete: _propTypes.PropTypes.func,
swipeReleaseAnimationFn: _propTypes.PropTypes.func,
fork icon0
star icon0
watch icon0

+ 363 other calls in file

216
217
218
219
220
221
222
223
224
225
options: _propTypes.PropTypes.object,
containerRef: _propTypes.PropTypes.func,
onScrollY: _propTypes.PropTypes.func,
onScrollX: _propTypes.PropTypes.func,
onScrollUp: _propTypes.PropTypes.func,
onScrollDown: _propTypes.PropTypes.func,
onScrollLeft: _propTypes.PropTypes.func,
onScrollRight: _propTypes.PropTypes.func,
onYReachStart: _propTypes.PropTypes.func,
onYReachEnd: _propTypes.PropTypes.func,
fork icon0
star icon0
watch icon1

+ 17 other calls in file