import clsx from 'clsx'; import React from 'react'; import { Text, Icon, Emoji } from 'pl-fe/components/ui'; import { useSettings } from 'pl-fe/hooks'; import AnimatedNumber from './animated-number'; import type { EmojiReaction } from 'pl-api'; 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 => { const { demetricator } = useSettings(); return ( ); }; interface IStatusActionButton extends React.ButtonHTMLAttributes { iconClassName?: string; icon: string; count?: number; active?: boolean; color?: Color; filled?: boolean; emoji?: EmojiReaction; text?: React.ReactNode; theme?: 'default' | 'inverse'; } const StatusActionButton = React.forwardRef((props, ref): JSX.Element => { const { icon, className, iconClassName, active, color, filled = false, count = 0, emoji, text, theme = 'default', ...filteredProps } = props; const renderIcon = () => { if (emoji) { return ( ); } else { return ( ); } }; const renderText = () => { if (text) { return ( {text} ); } else if (count) { return ( ); } }; return ( ); }); export { StatusActionButton as default };