diff --git a/src/CommentCount.jsx b/src/CommentCount.jsx index 127bc1a..3ddc4ce 100644 --- a/src/CommentCount.jsx +++ b/src/CommentCount.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { insertScript, removeScript, debounce, shallowComparison } from './utils'; const queueResetCount = debounce(() => { @@ -51,3 +52,12 @@ export class CommentCount extends React.Component { ); } } + +CommentCount.propTypes = { + shortname: PropTypes.string.isRequired, + config: PropTypes.shape({ + identifier: PropTypes.string, + url: PropTypes.string, + title: PropTypes.string, + }).isRequired, +}; diff --git a/src/CommentEmbed.jsx b/src/CommentEmbed.jsx index badd90a..492bb04 100644 --- a/src/CommentEmbed.jsx +++ b/src/CommentEmbed.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; const RADIX_BASE = 36; @@ -31,3 +32,11 @@ CommentEmbed.defaultProps = { width: 420, height: 320, }; + +CommentEmbed.propTypes = { + commentId: PropTypes.string.isRequired, + showMedia: PropTypes.bool, + showParentComment: PropTypes.bool, + width: PropTypes.number, + height: PropTypes.number, +}; diff --git a/src/DiscussionEmbed.jsx b/src/DiscussionEmbed.jsx index 0e26899..dd58f86 100644 --- a/src/DiscussionEmbed.jsx +++ b/src/DiscussionEmbed.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { insertScript, removeScript, shallowComparison } from './utils'; export class DiscussionEmbed extends React.Component { @@ -71,3 +72,13 @@ export class DiscussionEmbed extends React.Component { ); } } + +DiscussionEmbed.propTypes = { + shortname: PropTypes.string.isRequired, + config: PropTypes.shape({ + identifier: PropTypes.string, + url: PropTypes.string, + title: PropTypes.string, + onNewComment: PropTypes.func, + }).isRequired, +};