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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i children-prop-type

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • pwmckenna