diff --git a/components/ui/input.tsx b/components/ui/input.tsx index 7bad21e11..c4b77dedf 100644 --- a/components/ui/input.tsx +++ b/components/ui/input.tsx @@ -1,22 +1,21 @@ -import * as React from "react"; +import * as React from "react" -import { cn } from "@/lib/utils"; +import { cn } from "@/lib/utils" -const Input = React.forwardRef>( - ({ className, type, ...props }, ref) => { - return ( - - ); - } -); -Input.displayName = "Input"; +function Input({ className, type, ...props }: React.ComponentProps<"input">) { + return ( + + ) +} -export { Input }; +export { Input } diff --git a/components/ui/tooltip.tsx b/components/ui/tooltip.tsx index 18081b610..a4e90d4e9 100644 --- a/components/ui/tooltip.tsx +++ b/components/ui/tooltip.tsx @@ -1,30 +1,61 @@ -import * as React from "react"; -import * as TooltipPrimitive from "@radix-ui/react-tooltip"; +"use client" -import { cn } from "@/lib/utils"; +import * as React from "react" +import * as TooltipPrimitive from "@radix-ui/react-tooltip" -const TooltipProvider = TooltipPrimitive.Provider; +import { cn } from "@/lib/utils" -const Tooltip = TooltipPrimitive.Root; - -const TooltipTrigger = TooltipPrimitive.Trigger; - -const TooltipContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, sideOffset = 4, ...props }, ref) => ( - - ) { + return ( + - -)); -TooltipContent.displayName = TooltipPrimitive.Content.displayName; + ) +} + +function Tooltip({ + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +function TooltipTrigger({ + ...props +}: React.ComponentProps) { + return +} + +function TooltipContent({ + className, + sideOffset = 0, + children, + ...props +}: React.ComponentProps) { + return ( + + + {children} + + + + ) +} -export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }; +export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }