diff --git a/src/components/ui/IconButton.tsx b/src/components/ui/IconButton.tsx index bdbd7a7..c1b41c5 100644 --- a/src/components/ui/IconButton.tsx +++ b/src/components/ui/IconButton.tsx @@ -1,4 +1,4 @@ -import type { ButtonHTMLAttributes, ReactNode } from "react"; +import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from "react"; import { Button } from "@/components/ui/Button"; import { Tooltip, @@ -12,23 +12,26 @@ type IconButtonProps = ButtonHTMLAttributes & { label: string; }; -export function IconButton({ icon, label, ...props }: IconButtonProps) { - return ( - - - - - - {label} - - - ); -} +export const IconButton = forwardRef( + function IconButton({ icon, label, ...props }, ref) { + return ( + + + + + + {label} + + + ); + }, +);