UNPKG

react-facebook-next

Version:

Facebook components like a Login button, Like, Share, Comments or Embedded Post

41 lines (36 loc) 947 B
import React from 'react'; import PropTypes from 'prop-types'; import Parser from './Parser'; import getCurrentHref from './utils/getCurrentHref'; export default function CommentsCount(props) { var className = props.className, _props$href = props.href, href = _props$href === undefined ? getCurrentHref() : _props$href, children = props.children, onParse = props.onParse; return React.createElement( Parser, { className: className, onParse: onParse }, React.createElement( 'span', { className: 'fb-comments-count', 'data-href': href }, children ) ); } CommentsCount.propTypes = { className: PropTypes.string, href: PropTypes.string, children: PropTypes.node, onParse: PropTypes.func }; CommentsCount.defaultProps = { className: undefined, href: undefined, children: undefined, onParse: undefined }; //# sourceMappingURL=CommentsCount.js.map