From 3112e805449ace3e749ed461d7adb782e6691c22 Mon Sep 17 00:00:00 2001 From: rusconn Date: Sat, 24 Jun 2023 19:11:57 +0900 Subject: [PATCH] refactor: group some utility classes --- components/sidebar/tool-group.tsx | 15 +++++++++++++-- components/sidebar/tool-link.tsx | 3 ++- components/ui/input.tsx | 6 +++++- components/ui/label.tsx | 3 ++- components/ui/select.tsx | 9 +++++++-- components/ui/switch.tsx | 14 ++++++++++++-- components/ui/textarea.tsx | 6 +++++- components/ui/tooltip.tsx | 6 +++++- 8 files changed, 51 insertions(+), 11 deletions(-) diff --git a/components/sidebar/tool-group.tsx b/components/sidebar/tool-group.tsx index bad9fed..f3f5df0 100644 --- a/components/sidebar/tool-group.tsx +++ b/components/sidebar/tool-group.tsx @@ -5,6 +5,7 @@ import { usePathname } from "next/navigation"; import * as Accordion from "@radix-ui/react-accordion"; import { ToolGroup as IToolGroup } from "@/config/tools"; +import { cn } from "@/lib/style"; import { icons } from "@/components/icons"; import { ToolLink } from "./tool-link"; @@ -38,14 +39,24 @@ export function ToolGroup({ Icon, title, href, tools, isOpend }: Props) { /> svg]:rotate-180" + )} aria-label="toggle open/close state of the tool group" > - +
    {Object.values(tools).map(tool => (
  • diff --git a/components/sidebar/tool-link.tsx b/components/sidebar/tool-link.tsx index a0e867e..783fcfe 100644 --- a/components/sidebar/tool-link.tsx +++ b/components/sidebar/tool-link.tsx @@ -16,8 +16,9 @@ function RawToolLink({ Icon, shortTitle: title, href, onClick, className, highli return ( (({ className, .. diff --git a/components/ui/textarea.tsx b/components/ui/textarea.tsx index 6706449..3d2c510 100644 --- a/components/ui/textarea.tsx +++ b/components/ui/textarea.tsx @@ -10,7 +10,11 @@ export const RawTextarea = React.forwardRef(