We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6cab749 commit 00435adCopy full SHA for 00435ad
src/utils/propTypes.js
@@ -17,6 +17,10 @@ export let eventComponent = PropTypes.oneOfType([
17
})
18
])
19
20
+let viewNames = PropTypes.oneOf(
21
+ Object.keys(Views).map(k => Views[k])
22
+);
23
+
24
export let accessor = PropTypes.oneOfType([
25
PropTypes.string,
26
PropTypes.func
@@ -26,9 +30,7 @@ export let dateFormat = createChainableTypeChecker(
30
(...args) => localizer.propType && localizer.propType(...args))
27
31
28
32
export let views = PropTypes.oneOfType([
29
- PropTypes.oneOf(
- Object.keys(Views).map(k => Views[k])
- ),
33
+ PropTypes.arrayOf(viewNames),
34
all([
35
PropTypes.object,
36
(props, name, component)=>{
0 commit comments