import classNames from 'classnames'; import React from 'react'; import InlineSVG from 'react-inlinesvg'; import { Text } from 'soapbox/components/ui'; import { shortNumberFormat } from 'soapbox/utils/numbers'; const COLORS = { accent: 'text-accent-300 hover:text-accent-300 dark:hover:text-accent-300', success: 'text-success-600 hover:text-success-600 dark:hover:text-success-600', '': '', }; const FILL_COLORS = { accent: 'fill-accent-300 hover:fill-accent-300', '': '', }; type Color = keyof typeof COLORS; type FillColor = keyof typeof FILL_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, fill?: FillColor, } const StatusActionButton = React.forwardRef((props: IStatusActionButton, ref: React.ForwardedRef): JSX.Element => { const { icon, className, iconClassName, active, color = '', fill = '', count = 0, ...filteredProps } = props; return ( ); }); export default StatusActionButton;