element-of-prop-type

1.0.0 • Public • Published

element-of-prop-type

Checks if the prop is a React element of a specific type

usage

import elementOf from 'element-of-prop-type';

class MyComponent extends Component {
  static propTypes = {
    children: elementOf(MyChildComponent).isRequired
  };
  ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i element-of-prop-type

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • pwmckenna