import classNames from 'classnames'; import React from 'react'; import { Text, Icon } 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, } const StatusActionButton = React.forwardRef((props: IStatusActionButton, ref: React.ForwardedRef): JSX.Element => { const { icon, className, iconClassName, active, color, filled = false, count = 0, ...filteredProps } = props; return ( ); }); export default StatusActionButton;