Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

fix: update dock props (#451)

Dillion Verma4aff5c4d2bc0
diff --git a/registry/default/example/dock-demo.tsx b/registry/default/example/dock-demo.tsx
index 98bbd7d7..cff6c702 100644
--- a/registry/default/example/dock-demo.tsx
+++ b/registry/default/example/dock-demo.tsx
@@ -1,8 +1,8 @@
-import React from "react";
-import Link from "next/link";
import { CalendarIcon, HomeIcon, MailIcon, PencilIcon } from "lucide-react";
+import Link from "next/link";
+import React from "react";
-import { cn } from "@/lib/utils";
+import { ModeToggle } from "@/components/mode-toggle";
import { buttonVariants } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import {
@@ -11,7 +11,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
-import { ModeToggle } from "@/components/mode-toggle";
+import { cn } from "@/lib/utils";
import { Dock, DockIcon } from "@/registry/default/magicui/dock";
export type IconProps = React.HTMLAttributes<SVGElement>;
diff --git a/registry/default/magicui/dock.tsx b/registry/default/magicui/dock.tsx
index 1d9beb3a..4274e716 100644
--- a/registry/default/magicui/dock.tsx
+++ b/registry/default/magicui/dock.tsx
@@ -1,8 +1,14 @@
"use client";
-import React, { PropsWithChildren, useRef } from "react";
import { cva, type VariantProps } from "class-variance-authority";
-import { motion, useMotionValue, useSpring, useTransform } from "framer-motion";
+import {
+ motion,
+ MotionProps,
+ useMotionValue,
+ useSpring,
+ useTransform,
+} from "motion/react";
+import React, { useRef } from "react";
import { cn } from "@/lib/utils";
@@ -68,15 +74,14 @@ const Dock = React.forwardRef<HTMLDivElement, DockProps>(
);
Dock.displayName = "Dock";
-
-export interface DockIconProps {
+export interface DockIconProps
+ extends Omit<MotionProps & React.HTMLAttributes<HTMLDivElement>, "children"> {
size?: number;
magnification?: number;
distance?: number;
mouseX?: any;
className?: string;
children?: React.ReactNode;
- props?: PropsWithChildren;
}
const DockIcon = ({