import React from 'react'; import { useTheme } from 'styled-components'; import { Typography } from '..'; import AnimatedFavoriteIcon from '../../icons/AnimatedFavoriteIcon'; import { MobileTapArea, RoundButton } from './styles'; type FavoriteButtonProps = { active: boolean; disabled?: boolean; onClick?: React.MouseEventHandler; top?: number; right?: number; size?: 'default' | 'small'; favoriteCount?: null | number; }; const FavoriteButton = ({ active, onClick, top = 0, right = 0, disabled, size = 'default', favoriteCount = null, }: FavoriteButtonProps) => { const theme = useTheme(); const hasCount = Boolean(favoriteCount); return ( <> {hasCount && ( {favoriteCount} )} ); }; export default FavoriteButton;