mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-25 10:42:45 +00:00
Anchor the absolutely positioned screen reader install label to its count. Without a containing block inside the carousel, the invisible label escapes the scroll container and expands the document.
14 lines
479 B
TypeScript
14 lines
479 B
TypeScript
import { Download } from "lucide-react";
|
|
import { formatInstalls } from "./registry";
|
|
|
|
/** An install count as a download icon and the number; inherits the surrounding text style. */
|
|
export function InstallCount({ count }: { count: number }) {
|
|
return (
|
|
<span className="relative inline-flex items-center gap-1 tabular-nums">
|
|
<Download aria-hidden className="h-3 w-3" />
|
|
{formatInstalls(count)}
|
|
<span className="sr-only">installs</span>
|
|
</span>
|
|
);
|
|
}
|