An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Extra Prop Types

> Extra Prop Types for React Components

[![GitHub issues](https://img.shields.io/github/issues/brendon1555/extra-prop-types)](https://github.com/brendon1555/extra-prop-types/issues)
[![devDependencies](https://img.shields.io/david/dev/brendon1555/extra-prop-types)](https://david-dm.org/brendon1555/extra-prop-types?type=dev)
[![peerDependencies](https://img.shields.io/david/peer/brendon1555/extra-prop-types)](https://david-dm.org/brendon1555/extra-prop-types?type=peer)
[![License](https://img.shields.io/github/license/brendon1555/extra-prop-types)](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** |
| :-----------------------------------------------------------------------------------------------------: |
| [![Brendon1555](https://avatars3.githubusercontent.com/u/12216552?&v=3&s=200)](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

[![License](https://img.shields.io/github/license/brendon1555/extra-prop-types)](http://badges.mit-license.org)

- **[MIT license](http://opensource.org/licenses/mit-license.php)**
- Copyright 2020 © Brendon Lees.