Skip to content

Commit 7401e82

Browse files
committed
Update shimmer.tsx
1 parent ab7be16 commit 7401e82

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/elements/src/shimmer.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
"use client";
22

3+
import type { MotionProps } from "motion/react";
34
import type { CSSProperties, ElementType, JSX } from "react";
45

56
import { cn } from "@repo/shadcn-ui/lib/utils";
67
import { motion } from "motion/react";
78
import { memo, useMemo } from "react";
89

10+
type MotionHTMLProps = MotionProps & Record<string, unknown>;
11+
912
// Cache motion components at module level to avoid creating during render
1013
const motionComponentCache = new Map<
1114
keyof JSX.IntrinsicElements,
12-
ReturnType<typeof motion.create>
15+
React.ComponentType<MotionHTMLProps>
1316
>();
1417

1518
const getMotionComponent = (element: keyof JSX.IntrinsicElements) => {

0 commit comments

Comments
 (0)