mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-08 13:13:49 -05:00
34 lines
686 B
TypeScript
34 lines
686 B
TypeScript
import React from "react";
|
|
import { clsx } from "clsx";
|
|
|
|
export function GradientText({
|
|
text,
|
|
innerClassName,
|
|
className,
|
|
blur,
|
|
}: {
|
|
text: string;
|
|
innerClassName: string;
|
|
className?: string;
|
|
blur: number;
|
|
}) {
|
|
return (
|
|
<div className={clsx("relative", className)}>
|
|
<p
|
|
className={clsx("bg-clip-text text-transparent w-fit", innerClassName)}
|
|
>
|
|
{text}
|
|
</p>
|
|
<p
|
|
className={clsx(
|
|
"pointer-events-none absolute top-0 hidden select-none bg-clip-text text-transparent dark:block",
|
|
innerClassName,
|
|
)}
|
|
style={{ filter: `blur(${blur}px)` }}
|
|
>
|
|
{text}
|
|
</p>
|
|
</div>
|
|
);
|
|
}
|