import * as React from 'react';
import { injectIntl, IntlShape } from 'react-intl';
import classNames from 'classnames';
import { Text } from '@box/blueprint-web';
import { formatCount } from './numberUtils';
interface Props {
className?: string;
count: number;
intl: IntlShape;
isRedesignEnabled?: boolean;
onMouseEnter?: () => void;
onMouseLeave?: () => void;
}
function CompactCount({ className, count, intl, isRedesignEnabled, ...rest }: Props) {
const formattedCount = formatCount(count, intl);
if (isRedesignEnabled) {
return (
{formattedCount}
);
}
return (
{formatCount(count, intl)}
);
}
export default injectIntl(CompactCount);