import classNames from 'classnames'; import React from 'react'; import { Text, Icon, Emoji } from 'soapbox/components/ui'; import { shortNumberFormat } from 'soapbox/utils/numbers'; const COLORS = { accent: 'accent', success: 'success', }; type Color = keyof typeof COLORS; interface IStatusActionCounter { count: number, } /** Action button numerical counter, eg "5" likes. */ const StatusActionCounter: React.FC = ({ count = 0 }): JSX.Element => { return ( {shortNumberFormat(count)} ); }; interface IStatusActionButton extends React.ButtonHTMLAttributes { iconClassName?: string, icon: string, count?: number, active?: boolean, color?: Color, filled?: boolean, emoji?: string, } const StatusActionButton = React.forwardRef((props, ref): JSX.Element => { const { icon, className, iconClassName, active, color, filled = false, count = 0, emoji, ...filteredProps } = props; return ( ); }); export default StatusActionButton;