mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 09:18:30 +02:00
Split up HTTP sending logic (#320)
This commit is contained in:
@@ -3,11 +3,12 @@ import classNames from 'classnames';
|
||||
|
||||
interface Props {
|
||||
count: number | true;
|
||||
count2?: number | true;
|
||||
className?: string;
|
||||
color?: Color;
|
||||
}
|
||||
|
||||
export function CountBadge({ count, className, color }: Props) {
|
||||
export function CountBadge({ count, count2, className, color }: Props) {
|
||||
if (count === 0) return null;
|
||||
return (
|
||||
<div
|
||||
@@ -30,6 +31,16 @@ export function CountBadge({ count, className, color }: Props) {
|
||||
) : (
|
||||
count
|
||||
)}
|
||||
{count2 != null && (
|
||||
<>
|
||||
/
|
||||
{count2 === true ? (
|
||||
<div aria-hidden className="rounded-full h-1 w-1 bg-[currentColor]" />
|
||||
) : (
|
||||
count2
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user