JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 288579
  • Score
    100M100P100Q174411F
  • License MIT

validates style objects by ensuring they only have valid keys

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-stype-proptype');

var Comp = React.createClass({
  propTypes: {
    myStyle: stylePropType,
  },
  render(){ ... }
});

You can use stylePropType.isRequired similar to the built in proptypes.