extra-prop-types
v0.1.2
Published
Extra PropTypes for React
Downloads
703
Maintainers
Readme
Extra Prop Types
Extra Prop Types for React Components
Installation
$ yarn add extra-prop-types
or
$ npm install --save extra-prop-types
Usage
import * as ExtraPropTypes from 'extra-prop-types';
const SomeComponent = (colorProp) => (
<div style={{ backgroundColor: colorProp }}></div>
)
SomeComponent.propTypes = {
colorProp: ExtraPropTypes.color.isRequired
}
Types
color accepts:
- hex
- #ffffff
- rgb
- rgb(255, 255, 255)
- rgba
- rgba(255, 255, 255, 1)
- hsl
- hsl(0, 100%, 100%)
- hsla
- hsla(0, 0%, 100%, 1)
Contributing
Want to add a type? To get started...
Step 1
Option 1
- 🍴 Fork this repo!
Option 2
- 👯 Clone this repo to your local machine using
https://github.com/brendon1555/extra-prop-types.git
- 👯 Clone this repo to your local machine using
Step 2
- HACK AWAY! 🔨🔨🔨
Step 3
- 🔃 Create a new pull request using
https://github.com/brendon1555/extra-prop-types/compare/
.
Contributors
| Brendon Lees |
| :-----------------------------------------------------------------------------------------------------: |
| |
| github.com/brendon1555
|
Support
Reach out to me at one of the following places!
- Website at
brendon1555.com
- Twitter at
@brendon1555
License
- MIT license
- Copyright 2020 © Brendon Lees.