Package Exports
- prop-types-css
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 (prop-types-css) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Prop-Types-CSS
Type checking with style
Usage
Prop-Types-CSS exposes all types defined by the CSS spec as type-checkers.
Component.propTypes = {
color: PropTypesCss.color // Will match any valid css color
};Additionally, more specific checks for most types are available
Component.propTypes = {
color: PropTypesCss.color.hex // Will only match hex-colors
};Fields can also be marked required in the same way as the prop-types library.
Component.propTypes = {
color: PropTypesCss.color.keyword.isRequired // Will yield an error when a null-ish value is passed
};Contributing
If you want to contribute, thank you in advance! More information on how to do so can be found in the CONTRIBUTING.md.