Extra prop type validators for React
MIT License
Extra Prop Types for React Components
$ yarn add extra-prop-types
or
$ npm install --save extra-prop-types
import * as ExtraPropTypes from 'extra-prop-types';
const SomeComponent = (colorProp) => (
<div style={{ backgroundColor: colorProp }}></div>
)
SomeComponent.propTypes = {
colorProp: ExtraPropTypes.color.isRequired
}
color accepts:
Want to add a type? To get started...
Option 1
Option 2
https://github.com/brendon1555/extra-prop-types.git
https://github.com/brendon1555/extra-prop-types/compare/
.Brendon Lees |
---|
github.com/brendon1555
|
Reach out to me at one of the following places!
brendon1555.com
@brendon1555