webpack/scenes/ContentViews/components/IconWithCount.js
import React from 'react';
import PropTypes from 'prop-types';
import './IconWithCount.scss';
const IconWithCount = ({ count, title, Icon }) => (
<React.Fragment>
<Icon title={title} className="ktable-cell-icon" />
{count}
</React.Fragment>
);
IconWithCount.propTypes = {
count: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
title: PropTypes.string.isRequired,
Icon: PropTypes.elementType.isRequired,
};
export default IconWithCount;