import PropTypes from 'prop-types'; import classNames from 'classnames'; export default function MessageComponent(props) { const { faceUrl, isSelf, className, children, ...rest } = props; const cn = classNames(className, 'messagepad__message', { 'side--self': isSelf, 'side--other': !isSelf, }); return (
  • avatar
    {children}
  • ); } MessageComponent.propTypes = { isSelf: PropTypes.bool, faceUrl: PropTypes.string.isRequired, className: PropTypes.string, children: PropTypes.node, };