import React from 'react'; import Counter from '../counter/counter'; import SvgIcon from './svg-icon'; interface IIcon extends Pick, 'strokeWidth'> { /** Class name for the element. */ className?: string /** Number to display a counter over the icon. */ count?: number /** Optional max to cap count (ie: N+) */ countMax?: number /** Tooltip text for the icon. */ alt?: string /** URL to the svg icon. */ src: string /** Width and height of the icon in pixels. */ size?: number } /** Renders and SVG icon with optional counter. */ const Icon: React.FC = ({ src, alt, count, size, countMax, ...filteredProps }): JSX.Element => (
{count ? ( ) : null}
); export default Icon;