https://github.com/brendon1555/extra-prop-types
Extra prop type validators for React
https://github.com/brendon1555/extra-prop-types
prop-types react typescript validation
Last synced: 3 months ago
JSON representation
Extra prop type validators for React
- Host: GitHub
- URL: https://github.com/brendon1555/extra-prop-types
- Owner: brendon1555
- License: mit
- Created: 2020-03-14T02:49:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:29:09.000Z (over 3 years ago)
- Last Synced: 2025-04-02T12:43:59.469Z (about 1 year ago)
- Topics: prop-types, react, typescript, validation
- Language: TypeScript
- Homepage:
- Size: 1.06 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Extra Prop Types
> Extra Prop Types for React Components
[](https://github.com/brendon1555/extra-prop-types/issues)
[](https://david-dm.org/brendon1555/extra-prop-types?type=dev)
[](https://david-dm.org/brendon1555/extra-prop-types?type=peer)
[](http://badges.mit-license.org)
---
## Installation
```shell
$ yarn add extra-prop-types
```
or
```shell
$ npm install --save extra-prop-types
```
---
## Usage
```JSX
import * as ExtraPropTypes from 'extra-prop-types';
const SomeComponent = (colorProp) => (
)
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`
### Step 2
- **HACK AWAY!** 🔨🔨🔨
### Step 3
- 🔃 Create a new pull request using `https://github.com/brendon1555/extra-prop-types/compare/`.
---
## Contributors
| **Brendon Lees** |
| :-----------------------------------------------------------------------------------------------------: |
| [](https://brendon1555.com) |
| `github.com/brendon1555` |
---
## Support
Reach out to me at one of the following places!
- Website at `brendon1555.com`
- Twitter at `@brendon1555`
---
## License
[](http://badges.mit-license.org)
- **[MIT license](http://opensource.org/licenses/mit-license.php)**
- Copyright 2020 © Brendon Lees.