How to use the PropTypes function from react
Find comprehensive JavaScript react.PropTypes code examples handpicked from public code repositorys.
GitHub: kjda/ReactJs-Phonegap

3 4 5 6 7 8 9 10 11 12
var UI = require('react-topui'); module.exports = React.createClass({ propTypes: { links: React.PropTypes.array.isRequired }, nav: function(fragment){ window.location.href = fragment;
+ 3 other calls in file
43 44 45 46 47 48 49 50 51 52
return previewProp(this.props.val, !!this.props.nested, !!this.props.inverted, this.context.theme); } } PropVal.contextTypes = { theme: React.PropTypes.object.isRequired, }; function previewProp(val: any, nested: boolean, inverted: boolean, theme: Theme) { let style = {
3 4 5 6 7 8 9 10 11 12
var color = require('../../js/color') var GeneOpenMenu = React.createClass({ propTypes: { gene: React.PropTypes.object }, getInitialState: function() { return {
+ 4 other calls in file
GitHub: amazeui/amazeui-react

8 9 10 11 12 13 14 15 16 17
mixins: [ClassNameMixin], propTypes: { classPrefix: React.PropTypes.string, now: React.PropTypes.number, label: React.PropTypes.string, active: React.PropTypes.bool, striped: React.PropTypes.bool, amSize: React.PropTypes.string, amStyle: React.PropTypes.string
+ 13 other calls in file
GitHub: rccoder/amazeui-react

15 16 17 18 19 20 21 22 23 24
var Dropdown = React.createClass({ mixins: [ClassNameMixin], propTypes: { title: React.PropTypes.node.isRequired, dropup: React.PropTypes.bool, navItem: React.PropTypes.bool, btnStyle: React.PropTypes.string, btnSize: React.PropTypes.string, btnInlineStyle: React.PropTypes.object,
+ 41 other calls in file
30 31 32 33 34 35 36 37 38 39
}; var ParallaxScrollViewComposition = React.createClass({ propTypes: { scrollViewComponent: React.PropTypes.func, }, setNativeProps: function(nativeProps) { this._root.setNativeProps(nativeProps);
4 5 6 7 8 9 10 11 12
var color = require('../../js/color') var GenePanel = React.createClass({ propTypes: { gene: React.PropTypes.object.isRequired }, render: function() {
+ 3 other calls in file
12 13 14 15 16 17 18 19 20 21 22 23
var FileUploader = React.createClass({ displayName: 'FileUploader', propTypes: { allowClear: React.PropTypes.bool, allowDownload: React.PropTypes.bool, onClickClear: React.PropTypes.func, mode: React.PropTypes.oneOf(['object', 'array']),
+ 25 other calls in file
30 31 32 33 34 35 36 37 38 39 40 41
var ColorPicker = React.createClass({ displayName: 'ColorPicker', propTypes: { width: React.PropTypes.number, height: React.PropTypes.number, type: React.PropTypes.oneOf(_.keys(pickers)), format: React.PropTypes.oneOf([ 'rgb', 'hsl', 'hsv', 'cmyk',
+ 13 other calls in file
4 5 6 7 8 9 10 11 12 13 14 15
d3 = require('d3'); var mixinChart = { propTypes: { limit: React.PropTypes.number, loading: React.PropTypes.bool, data: React.PropTypes.array, colors: React.PropTypes.array, groupExtra: React.PropTypes.bool,
+ 35 other calls in file
17 18 19 20 21 22 23 24 25 26
groupExtra: React.PropTypes.bool, collapsible: React.PropTypes.bool, renderItem: React.PropTypes.func, width: React.PropTypes.number, height: React.PropTypes.number, style: React.PropTypes.object, data: React.PropTypes.array, onOpen: React.PropTypes.func, OnClose: React.PropTypes.func, labelViewAll: React.PropTypes.string,
+ 25 other calls in file
25 26 27 28 29 30 31 32 33 34
min: React.PropTypes.number, /** * Maximum */ max: React.PropTypes.number, /** * value */
+ 11 other calls in file
32 33 34 35 36 37 38 39 40
defaultValue: React.PropTypes.any, /** * callback function calls on changing value */ onChange: React.PropTypes.func, icons: React.PropTypes.oneOf(['native', 'nice', 'toggle']) },
+ 7 other calls in file
149 150 151 152 153 154 155 156 157 158 159 160
const ReactPlayground = React.createClass({ mixins: [selfCleaningTimeout], propTypes: { codeText: React.PropTypes.string.isRequired, transformer: React.PropTypes.func }, getDefaultProps() { return {
12 13 14 15 16 17 18 19 20 21 22
var CodeMirror = React.createClass({ displayName: 'CodeMirror', propTypes: { className: React.PropTypes.any, codeMirrorInstance: React.PropTypes.func, defaultValue: React.PropTypes.string, onChange: React.PropTypes.func, onFocusChange: React.PropTypes.func, onScroll: React.PropTypes.func,
+ 9 other calls in file
GitHub: SashaKa/my-react-dog
8136 8137 8138 8139 8140 8141 8142 8143 8144 8145
/** * Function responsible for tracking the loaded state of each row. * It should implement the following signature: ({ index: number }): boolean */ isRowLoaded: _react.PropTypes.func.isRequired, /** * Callback to be invoked when more rows must be loaded. * It should implement the following signature: ({ startIndex, stopIndex }): Promise
+ 166 other calls in file
GitHub: SashaKa/my-react-dog
37 38 39 40 41 42 43 44 45 46
ignoreAccents: _react2['default'].PropTypes.bool, // strip diacritics when filtering; defaults to true ignoreCase: _react2['default'].PropTypes.bool, // perform case-insensitive filtering; defaults to true loadingPlaceholder: _react2['default'].PropTypes.oneOfType([// replaces the placeholder while options are loading _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]), loadOptions: _react2['default'].PropTypes.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise options: _react.PropTypes.array.isRequired, // array of options placeholder: _react2['default'].PropTypes.oneOfType([// field placeholder, displayed when there's no value (shared with Select) _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]), noResultsText: _react2['default'].PropTypes.oneOfType([// field noResultsText, displayed when no options come back from the server _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
GitHub: Videri/material-ui

7 8 9 10 11 12 13 14 15 16
let TableBody = React.createClass({ mixins: [ClickAwayable, StylePropable], propTypes: { allRowsSelected: React.PropTypes.bool, deselectOnClickaway: React.PropTypes.bool, displayRowCheckbox: React.PropTypes.bool, multiSelectable: React.PropTypes.bool, onCellClick: React.PropTypes.func,
+ 29 other calls in file
react.default is the most popular function in react (505 examples)