Package Exports
- react-style-proptype
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-style-proptype) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Validates style objects by ensuring the keys are valid css property names (in camelcase form).
var stylePropType = require('react-style-proptype');
var Comp = React.createClass({
propTypes: {
myStyle: stylePropType,
},
render(){ ... }
});
You can use stylePropType.isRequired similar to the built in proptypes.
Arrays
With react-native styles can be passed an array of objects. You can use this variant with
stylePropTypes.supportingArrays
.