Files
mr_decor/components/utilities/meteor-title-background.tsx
T

25 lines
642 B
TypeScript

import { cn } from "@/lib/utils";
interface MeteorTitleBackgroundProps {
className?: string;
count?: number;
}
const meteorIndices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
export function MeteorTitleBackground({ className, count = 16 }: MeteorTitleBackgroundProps) {
return (
<div
aria-hidden
className={cn(
"pointer-events-none absolute inset-0 overflow-hidden rounded-2xl",
className,
)}
>
{meteorIndices.slice(0, count).map((index) => (
<span key={index} className={cn("meteor-title-streak", `meteor-title-streak-${index}`)} />
))}
</div>
);
}