diff --git a/registry/default/magicui/dock.tsx b/registry/default/magicui/dock.tsx index 1e89faa73..d59b27e40 100644 --- a/registry/default/magicui/dock.tsx +++ b/registry/default/magicui/dock.tsx @@ -8,6 +8,7 @@ import { useMotionValue, useSpring, useTransform, + MotionProps, } from "framer-motion"; import { cn } from "@/lib/utils"; @@ -26,7 +27,7 @@ const DEFAULT_MAGNIFICATION = 60; const DEFAULT_DISTANCE = 140; const dockVariants = cva( - "supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl border p-2 backdrop-blur-md", + "supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl border p-2 backdrop-blur-md" ); const Dock = React.forwardRef( @@ -40,7 +41,7 @@ const Dock = React.forwardRef( direction = "middle", ...props }, - ref, + ref ) => { const mouseX = useMotionValue(Infinity); @@ -74,12 +75,13 @@ const Dock = React.forwardRef( {renderChildren()} ); - }, + } ); Dock.displayName = "Dock"; -export interface DockIconProps { +export interface DockIconProps + extends Omit, "children"> { size?: number; magnification?: number; distance?: number; @@ -110,7 +112,7 @@ const DockIcon = ({ const sizeTransform = useTransform( distanceCalc, [-distance, 0, distance], - [size, magnification, size], + [size, magnification, size] ); const scaleSize = useSpring(sizeTransform, { @@ -125,7 +127,7 @@ const DockIcon = ({ style={{ width: scaleSize, height: scaleSize, padding }} className={cn( "flex aspect-square cursor-pointer items-center justify-center rounded-full", - className, + className )} {...props} >