Skip to content

Commit

Permalink
fix: update dock props (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillionverma authored Dec 18, 2024
1 parent 73ed34c commit 4aff5c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions registry/default/example/dock-demo.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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>;
Expand Down
15 changes: 10 additions & 5 deletions registry/default/magicui/dock.tsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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 = ({
Expand Down

0 comments on commit 4aff5c4

Please sign in to comment.