How to use the string function from prop-types
Find comprehensive JavaScript prop-types.string code examples handpicked from public code repositorys.
GitHub: szhsin/react-menu
269 270 271 272 273 274 275 276 277 278
var stylePropTypes = function stylePropTypes(name) { var _ref; return _ref = {}, _ref[name ? name + "ClassName" : 'className'] = propTypes.oneOfType([propTypes.string, propTypes.func]), _ref; }; var menuPropTypes = /*#__PURE__*/_extends({ className: propTypes.string }, /*#__PURE__*/stylePropTypes('menu'), /*#__PURE__*/stylePropTypes('arrow'), { focusProps: propTypes.object, menuStyle: propTypes.object, arrowStyle: propTypes.object,
48
883
6
+ 2 other calls in file
45 46 47 48 49 50 51 52 53
output: PropTypes.array, hasError: PropTypes.bool, error: PropTypes.string }), xdebug: PropTypes.shape({ status: PropTypes.string }), container: PropTypes.func.isRequired };
7
42
4
618 619 620 621 622 623 624 625 626 627 628 629
} }) } createCategoriesPagesDirectors.propTypes = { categoriesPath: PropTypes.string.isRequired, parentCrumbs: PropTypes.object } /**
3
12
3
+ 14 other calls in file
GitHub: kelp404/capybara-router
4 5 6 7 8 9 10 11 12 13
module.exports = class Link extends React.PureComponent { static propTypes = { to: PropTypes.oneOfType([ PropTypes.string.isRequired, PropTypes.shape({ name: PropTypes.string.isRequired, params: PropTypes.object, }).isRequired, ]).isRequired, };
1
2
2
+ 9 other calls in file
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164
}); App.propTypes = { packageName: PropTypes.string.isRequired, packageVersion: PropTypes.string.isRequired, availableVersions: PropTypes.arrayOf(PropTypes.string), filename: PropTypes.string.isRequired, target: targetType.isRequired }; }
0
1
0
+ 10 other calls in file
GitHub: steedos/steedos-unpkg
850 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
0
1
0
+ 10 other calls in file
225 226 227 228 229 230 231 232 233 234
separator: _propTypes.string, filename: _propTypes.string, uFEFF: _propTypes.bool, onClick: _propTypes.func, asyncOnClick: _propTypes.bool, enclosingCharacter: _propTypes.string }; var defaultProps = exports.defaultProps = { separator: ',',
261
0
18
4 5 6 7 8 9 10 11 12 13
const createMiddleware = require('./middleware'); const { MemoryStrategy } = require('./strategies'); 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,
87
0
1
+ 5 other calls in file
GitHub: jimczj/issue-helper
49 50 51 52 53 54 55 56 57 58
required: PropTypes.bool })) }) const configPropTypes = { logo: PropTypes.string.isRequired, repo: PropTypes.string.isRequired, title: PropTypes.string.isRequired, similarIssueCount: PropTypes.number, readme: stringType,
0
4
2
+ 11 other calls in file
73 74 75 76 77 78 79 80 81 82
); } } Button.contextTypes = { color: PropTypes.string }; class Message extends React.Component { render() {
553
0
3
+ 5 other calls in file
GitHub: Stremio/stremio-web
72 73 74 75 76 77 78 79 80 81
posterShape: PropTypes.string })), itemComponent: PropTypes.elementType, deepLinks: PropTypes.shape({ discover: PropTypes.string, library: PropTypes.string }) }; module.exports = MetaRow;
129
506
31
+ 7 other calls in file
15 16 17 18 19 20 21 22 23 24 25
} } DateTime.propTypes = { value: PropTypes.instanceOf(Date), timeZone: PropTypes.string }; export default DateTime;
0
1
0
GitHub: nudj/components
66 67 68 69 70 71 72 73 74 75
styleSheet: PropTypes.objectOf(CustomPropTypes.style), checked: PropTypes.bool, onChange: PropTypes.func, id: PropTypes.string.isRequired, name: PropTypes.string.isRequired, value: PropTypes.string.isRequired, label: PropTypes.node, nonsensitive: PropTypes.bool }
0
0
0
+ 2 other calls in file
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109
MetaTagger.propTypes = { title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, pathname: PropTypes.string.isRequired, site: PropTypes.string.isRequired, subsite: PropTypes.string, contentType: PropTypes.string, imageUrl: PropTypes.string, imageUrlThumbnail: PropTypes.string,
0
0
0
+ 33 other calls in file
33 34 35 36 37 38 39 40 41 42 43
render() { return <span>{this.props.prop}</span>; } }; RequiredPropComponent.displayName = 'RequiredPropComponent'; RequiredPropComponent.propTypes = {prop: PropTypes.string.isRequired}; it('works', () => { const container = document.createElement('div'); ReactDOM.render(<h1>hello</h1>, container);
0
0
0
209 210 211 212 213 214 215 216 217 218 219
) } } MSWordContainer.propTypes = { title: PropTypes.string } module.exports = MSWordContainer
0
0
2
+ 2 other calls in file
189 190 191 192 193 194 195 196
TableControls.propTypes = { createButton: PropTypes.bool.isRequired , perspective: PropTypes.shape( SerialisedPerspective ).isRequired // This is the row that is selected in the table, possibly none. , selectedroleinstance: PropTypes.string };
0
0
1
+ 2 other calls in file
244 245 246 247 248 249 250 251 252 253 254
PerspectiveBasedForm.propTypes = { perspective: PropTypes.shape( SerialisedPerspective ).isRequired , roleinstance: PropTypes.string , myroletype: PropTypes.string.isRequired , contextinstance: PropTypes.string.isRequired , behaviours: PropTypes.arrayOf(PropTypes.func) , cardtitle: PropTypes.string.isRequired };
0
0
1
+ 26 other calls in file
193 194 195 196 197 198 199 200 201 202
TablePasteRole.propTypes = { systemexternalrole: PropTypes.string.isRequired , contextinstance: PropTypes.string.isRequired , contexttype: PropTypes.string.isRequired , roletype: PropTypes.string.isRequired , selectedroleinstance: PropTypes.string , myroletype: PropTypes.string.isRequired };
0
0
1
+ 17 other calls in file
340 341 342 343 344 345 346 347 348
// PSContext. // Can also be a qualified name. rol: PropTypes.string.isRequired // fully qualified name: the type of Context to create. // The core loads the model that defines this type, if it is not locally available. , contexttocreate: PropTypes.string // When a perspective is provided, the RoleInstances does not retrieve information from the core itself. , perspective: PropTypes.object };
0
0
1
+ 5 other calls in file
prop-types.default is the most popular function in prop-types (2947 examples)