Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: custom css property reference

Marc Seitzaaab2dd89dda
diff --git a/components/ai-elements/shimmer.tsx b/components/ai-elements/shimmer.tsx
index 9163aac4..664db28c 100644
--- a/components/ai-elements/shimmer.tsx
+++ b/components/ai-elements/shimmer.tsx
@@ -1,7 +1,5 @@
"use client";
-import { cn } from "@/lib/utils";
-import { motion } from "motion/react";
import {
type CSSProperties,
type ElementType,
@@ -10,6 +8,10 @@ import {
useMemo,
} from "react";
+import { motion } from "motion/react";
+
+import { cn } from "@/lib/utils";
+
export type TextShimmerProps = {
children: string;
as?: ElementType;
@@ -26,12 +28,12 @@ const ShimmerComponent = ({
spread = 2,
}: TextShimmerProps) => {
const MotionComponent = motion.create(
- Component as keyof JSX.IntrinsicElements
+ Component as keyof JSX.IntrinsicElements,
);
const dynamicSpread = useMemo(
() => (children?.length ?? 0) * spread,
- [children, spread]
+ [children, spread],
);
return (
@@ -39,15 +41,15 @@ const ShimmerComponent = ({
animate={{ backgroundPosition: "0% center" }}
className={cn(
"relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",
- "[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
- className
+ "[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
+ className,
)}
initial={{ backgroundPosition: "100% center" }}
style={
{
"--spread": `${dynamicSpread}px`,
backgroundImage:
- "var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",
+ "var(--bg), linear-gradient(var(--muted-foreground), var(--muted-foreground))",
} as CSSProperties
}
transition={{