Extra PropTypes for use with React components
npm install react-extra-prop-typesIncludes some additional React PropTypes for common use cases. No dependencies.

* integer - invalid if prop is non-integer
* color - invalid if prop is not valid CSS color string (rgb(a), hsl(a), hex). Excludes keywords.
* datetime - invalid if prop is not string which can be passed to JavaScript Date constructor with valid result
* uuid - invalid if prop is not valid UUID
``javascript
var ExtraPropTypes = require('react-extra-prop-types');
var color = ExtraPropTypes.color;
var uuid = ExtraPropTypes.uuid;
// or ...
var color = require('react-extra-prop-types/lib/color');
var uuid = require('react-extra-prop-types/lib/uuid');
`
`javascript`
MyReactComponent.propTypes = {
id: ExtraPropTypes.integer,
name: React.PropTypes.string,
lastFetchTime: ExtraPropTypes.datetime
};
`javascript``
MyReactComponent.propTypes = {
id: ExtraPropTypes.integer.isRequired // can't be left out
};
See CONTRIBUTING.md.