diff --git a/webview-ui/src/components/chat/LucideIconButton.tsx b/webview-ui/src/components/chat/LucideIconButton.tsx index 5e5137f16be..a527df3f1d0 100644 --- a/webview-ui/src/components/chat/LucideIconButton.tsx +++ b/webview-ui/src/components/chat/LucideIconButton.tsx @@ -1,3 +1,4 @@ +import { forwardRef } from "react" import { cn } from "@src/lib/utils" import { Button, StandardTooltip } from "@src/components/ui" import { Loader2, LucideIcon } from "lucide-react" @@ -11,40 +12,35 @@ interface LucideIconButtonProps extends React.ButtonHTMLAttributes = ({ - icon, - title, - className, - disabled, - tooltip = true, - isLoading, - onClick, - style, - ...props -}) => { - const Icon = icon - return ( - - - - ) -} +export const LucideIconButton = forwardRef( + ({ icon, title, className, disabled, tooltip = true, isLoading, onClick, style, ...props }, ref) => { + const Icon = icon + return ( + + + + ) + }, +) + +LucideIconButton.displayName = "LucideIconButton"