How to use the arrayOf function from prop-types
Find comprehensive JavaScript prop-types.arrayOf code examples handpicked from public code repositorys.
231 232 233 234 235 236 237 238 239
* top of the screen when scrolling. For example, passing * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the * top of the scroll view. This property is not supported in conjunction * with `horizontal={true}`. */ stickyHeaderIndices: PropTypes.arrayOf(PropTypes.number).isRequired, /** * Flag indicating whether empty section headers should be rendered. In the future release * empty section headers will be rendered by default, and the flag will be deprecated.
481
0
231
78 79 80 81 82 83 84 85 86
PropTypes.number, PropTypes.instanceOf(Message) ]), // An array of a certain type optionalArrayOf: PropTypes.arrayOf(PropTypes.number), // An object with property values of a certain type optionalObjectOf: PropTypes.objectOf(PropTypes.number),
388
0
3
+ 3 other calls in file
GitHub: Stremio/stremio-web
66 67 68 69 70 71 72 73 74 75
MetaRow.propTypes = { className: PropTypes.string, title: PropTypes.string, message: PropTypes.string, items: PropTypes.arrayOf(PropTypes.shape({ posterShape: PropTypes.string })), itemComponent: PropTypes.elementType, deepLinks: PropTypes.shape({
129
506
31
+ 3 other calls in file
GitHub: Stremio/stremio-web
90 91 92 93 94 95 96 97 98 99
}; Router.propTypes = { className: PropTypes.string, onPathNotMatch: PropTypes.func, viewsConfig: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.exact({ regexp: PropTypes.instanceOf(RegExp).isRequired, urlParamsNames: PropTypes.arrayOf(PropTypes.string).isRequired, component: PropTypes.elementType.isRequired }))).isRequired
129
502
31
+ 3 other calls in file
GitHub: jimczj/issue-helper
40 41 42 43 44 45 46 47 48 49
}) ]) const formType = PropTypes.shape({ title: stringType, formItems: PropTypes.arrayOf(PropTypes.shape({ label: stringType, mdTitle: PropTypes.string, type: PropTypes.oneOf(['textarea', 'version', 'code', 'input']).isRequired, required: PropTypes.bool
0
4
2
6 7 8 9 10 11 12 13 14 15
const ShopifyConfigTypes = { apiKey: PropTypes.string.isRequired, host: PropTypes.string.isRequired, secret: PropTypes.string.isRequired, scope: PropTypes.arrayOf(PropTypes.string).isRequired, afterAuth: PropTypes.func.isRequired, shopStore: PropTypes.object, accessMode: PropTypes.oneOf(['offline', 'online']) };
87
0
1
31 32 33 34 35 36 37 38 39 40
const ImageSourcePropType = PropTypes.oneOfType([ ImageURISourcePropType, // Opaque type returned by require('./image.jpg') PropTypes.number, // Multiple sources PropTypes.arrayOf(ImageURISourcePropType), ]); module.exports = ImageSourcePropType;
5
3
0
GitHub: steedos/steedos-unpkg
851 852 853 854 855 856 857 858 859 860
if (process.env.NODE_ENV !== 'production') { FileViewer.propTypes = { path: PropTypes.string.isRequired, details: PropTypes.shape({ contentType: PropTypes.string.isRequired, highlights: PropTypes.arrayOf(PropTypes.string), // code uri: PropTypes.string, // images integrity: PropTypes.string.isRequired,
0
1
0
+ 2 other calls in file
GitHub: AquaSet/Scratch
913 914 915 916 917 918 919 920 921 922
canSave: PropTypes.bool, canShare: PropTypes.bool, canToggleComments: PropTypes.bool, canUseBackpack: PropTypes.bool, cloudHost: PropTypes.string, comments: PropTypes.arrayOf(PropTypes.object), enableCommunity: PropTypes.bool, faved: PropTypes.bool, favedLoaded: PropTypes.bool, fullScreen: PropTypes.bool,
0
0
1
+ 2 other calls in file
GitHub: AquaSet/Scratch
92 93 94 95 96 97 98 99 100 101 102
PhoneInput.propTypes = { className: PropTypes.string, defaultCountry: PropTypes.string, disabled: PropTypes.bool, errorMessages: PropTypes.arrayOf(PropTypes.node), help: PropTypes.string, id: PropTypes.string, name: PropTypes.string, onChange: PropTypes.func,
0
0
1
GitHub: iustins/online-shop
1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556
})))); }; DataTableHead.propTypes = { color: PropTypes.string, columns: PropTypes.arrayOf(PropTypes.object), handleSort: PropTypes.func, scrollX: PropTypes.bool, scrollY: PropTypes.bool, sortable: PropTypes.bool,
0
0
1
+ 109 other calls in file
GitHub: afialapis/xeira
14 15 16 17 18 19 20 21 22 23
id: "money-div" }, getMoney(collections)); } } _defineProperty(MoneyDiv, "propTypes", { collections: PropTypes.arrayOf(PropTypes.object) }); module.exports = { MoneyDiv };
0
0
2
518 519 520 521 522 523 524 525 526 527
* * @platform ios */ dataDetectorTypes: (PropTypes.oneOfType([ PropTypes.oneOf(DataDetectorTypes), PropTypes.arrayOf(PropTypes.oneOf(DataDetectorTypes)), ]): React$PropType$Primitive< | 'phoneNumber' | 'link' | 'address'
0
0
1
GitHub: saumyatalwani/blogBack
870 871 872 873 874 875 876 877 878 879
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]), defaultTitle: PropTypes.string, defer: PropTypes.bool, encodeSpecialCharacters: PropTypes.bool, htmlAttributes: PropTypes.object, link: PropTypes.arrayOf(PropTypes.object), meta: PropTypes.arrayOf(PropTypes.object), noscript: PropTypes.arrayOf(PropTypes.object), onChangeClientState: PropTypes.func, script: PropTypes.arrayOf(PropTypes.object),
0
0
1
+ 19 other calls in file
87 88 89 90 91 92 93 94 95 96
} // Always returns an object with this shape: // PropTypes.shape( // { values: PropTypes.arrayOf( PropTypes.string ).isRequired // , propertyVerbs: PropTypes.arrayOf( PropTypes.string).isRequired // }) findValues( propId ) { const component = this;
0
0
1
+ 8 other calls in file
640 641 642 643 644 645 646 647 648 649
ZoomableGroup.propTypes = { center: PropTypes.array, zoom: PropTypes.number, minZoom: PropTypes.number, maxZoom: PropTypes.number, translateExtent: PropTypes.arrayOf(PropTypes.array), onMoveStart: PropTypes.func, onMove: PropTypes.func, onMoveEnd: PropTypes.func, className: PropTypes.string
0
0
0
391 392 393 394 395 396 397 398 399 400 401
return React.createElement("div", null, navigationHeading, linkListItems); } LinkList.propTypes = { title: PropTypes.string, links: PropTypes.arrayOf(PropTypes.shape({ to: PropTypes.string.isRequired, name: PropTypes.string.isRequired })).isRequired, bullets: PropTypes.bool
0
0
0
+ 3 other calls in file
GitHub: romibi/CodingTrain
21 22 23 24 25 26 27 28 29 30
author: link.author.isRequired, }); const customSection = module.exports.customSection = exact({ title: PropTypes.string.isRequired, items: PropTypes.arrayOf(PropTypes.shape(link)).isRequired, }); const videoBase = module.exports.videoBase = exact({ title: PropTypes.string.isRequired,
0
0
2
+ 17 other calls in file
prop-types.default is the most popular function in prop-types (2947 examples)