import React from 'react'; import PropTypes from 'prop-types'; import Icon from 'soapbox/components/icon'; import { shortNumberFormat } from 'soapbox/utils/numbers'; const IconWithCounter = ({ icon, count, fixedWidth }) => { return (
{count > 0 && {shortNumberFormat(count)} }
); }; IconWithCounter.propTypes = { icon: PropTypes.string.isRequired, count: PropTypes.number.isRequired, fixedWidth: PropTypes.bool, }; export default IconWithCounter;