extra-prop-types
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Extra Prop Types

Extra Prop Types for React Components

GitHub issues devDependencies peerDependencies License


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

Step 2

  • HACK AWAY! 🔨🔨🔨

Step 3


Contributors

Brendon Lees
Brendon1555
github.com/brendon1555

Support

Reach out to me at one of the following places!


License

License

Package Sidebar

Install

npm i extra-prop-types

Weekly Downloads

279

Version

0.1.2

License

MIT

Unpacked Size

29.2 kB

Total Files

10

Last publish

Collaborators

  • brendon1555