children-prop-type

1.0.0 • Public • Published

children-prop-type

http://stackoverflow.com/a/42122662

usage

import children from 'children-prop-type';
class MyComponent from Component {
  static propTypes = {
    children: children(PropTypes.node) 
  };
  ...
}

Alternatively combine with element-is-prop-type to specify the actually components that are passed in as children.

/children-prop-type/

    Package Sidebar

    Install

    npm i children-prop-type

    Weekly Downloads

    1

    Version

    1.0.0

    License

    ISC

    Last publish

    Collaborators

    • pwmckenna