From 4a9807ccd8905735f49a03fc1fff4218a9dafae6 Mon Sep 17 00:00:00 2001 From: limiteinductive Date: Sun, 29 Mar 2026 20:01:22 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20TS=20build=20errors=20=E2=80=94=20remove?= =?UTF-8?q?=20asChild,=20simplify=20type=20selector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SheetTrigger: remove asChild (base-ui doesn't support it) - ComposeBox: use plain buttons with cn() instead of ToggleGroup (API mismatch) - Remove unused Button import from App Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/colony/src/App.tsx | 7 ++----- ui/colony/src/components/ComposeBox.tsx | 26 +++++++++++++------------ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/ui/colony/src/App.tsx b/ui/colony/src/App.tsx index e6f1e8a..0b79506 100644 --- a/ui/colony/src/App.tsx +++ b/ui/colony/src/App.tsx @@ -6,7 +6,6 @@ import { ChannelSidebar } from "@/components/ChannelSidebar"; import { MessageItem } from "@/components/MessageItem"; import { ComposeBox } from "@/components/ComposeBox"; import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"; -import { Button } from "@/components/ui/button"; export default function App() { const [channels, setChannels] = useState([]); @@ -87,10 +86,8 @@ export default function App() {
{/* Mobile: Sheet trigger */} - - + + = {sidebar} diff --git a/ui/colony/src/components/ComposeBox.tsx b/ui/colony/src/components/ComposeBox.tsx index a99d7c8..da4d878 100644 --- a/ui/colony/src/components/ComposeBox.tsx +++ b/ui/colony/src/components/ComposeBox.tsx @@ -3,7 +3,7 @@ import type { MessageType } from "@/types/MessageType"; import { postMessage } from "@/api"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; -import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"; +import { cn } from "@/lib/utils"; interface Props { channelId: string; @@ -60,22 +60,24 @@ export function ComposeBox({ )}
- { if (v) setMsgType(v as MessageType); }} - className="gap-0.5" - > + {/* Type selector */} +
{MSG_TYPES.map((t) => ( - setMsgType(t.value)} + className={cn( + "h-7 w-7 md:h-6 md:w-6 rounded-sm text-xs font-bold transition-colors", + msgType === t.value + ? "bg-primary text-primary-foreground" + : "text-muted-foreground hover:text-foreground" + )} > {t.label} - + ))} - +