From 7ac37c300585fe5a01f74d751d013e0691751a09 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Sun, 29 Mar 2026 19:42:05 +0200 Subject: [PATCH] fix(web): fix Slot import from unified radix-ui package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the unified radix-ui package exports Slot as a namespace object, not a component directly — use Slot.Root instead Co-Authored-By: Claude Opus 4.6 (1M context) --- webui2/src/components/ui/button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui2/src/components/ui/button.tsx b/webui2/src/components/ui/button.tsx index 1f87e65c0f70d3b9c7e44ccc969d709d8289699b..b4f023621819f49669dece8f85757b8aa6689892 100644 --- a/webui2/src/components/ui/button.tsx +++ b/webui2/src/components/ui/button.tsx @@ -1,5 +1,5 @@ import { cva, type VariantProps } from "class-variance-authority"; -import { Slot } from "radix-ui"; +import { Slot as SlotPrimitive } from "radix-ui"; import * as React from "react"; import { cn } from "@/lib/utils"; @@ -38,7 +38,7 @@ export interface ButtonProps const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; + const Comp = asChild ? SlotPrimitive.Root : "button"; return ( );