From 41ad0f718dcda69d502b28302571741470672e05 Mon Sep 17 00:00:00 2001 From: Eunjae Lee Date: Mon, 1 Dec 2025 14:13:01 +0100 Subject: [PATCH] refactor: use Button component instead of plain button in CopyButton (#25489) * refactor: use Button component instead of plain button in CopyButton Co-Authored-By: eunjae@cal.com * add shrink-0 to StartIcon and EndIcon of Button * remove unused class names --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../insights/hooks/useInsightsColumns.tsx | 27 +++++++------------ packages/ui/components/button/Button.tsx | 10 ++++--- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/packages/features/insights/hooks/useInsightsColumns.tsx b/packages/features/insights/hooks/useInsightsColumns.tsx index 49b4760f60..8590a7e208 100644 --- a/packages/features/insights/hooks/useInsightsColumns.tsx +++ b/packages/features/insights/hooks/useInsightsColumns.tsx @@ -1,5 +1,4 @@ import { createColumnHelper } from "@tanstack/react-table"; -// eslint-disable-next-line no-restricted-imports import startCase from "lodash/startCase"; import { useMemo } from "react"; import { z } from "zod"; @@ -11,7 +10,7 @@ import { useCopy } from "@calcom/lib/hooks/useCopy"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { RoutingFormFieldType } from "@calcom/routing-forms/lib/FieldTypes"; import { Badge } from "@calcom/ui/components/badge"; -import { Icon } from "@calcom/ui/components/icon"; +import { Button } from "@calcom/ui/components/button"; import { BookedByCell } from "../components/BookedByCell"; import { BookingAtCell } from "../components/BookingAtCell"; @@ -349,24 +348,16 @@ function CopyButton({ label, value }: { label: string; value: string }) { const { copyToClipboard, isCopied } = useCopy(); const { t } = useLocale(); return ( - + {isCopied ? t("copied") : label} + ); } diff --git a/packages/ui/components/button/Button.tsx b/packages/ui/components/button/Button.tsx index b1f9bd547e..fcd87c1f9d 100644 --- a/packages/ui/components/button/Button.tsx +++ b/packages/ui/components/button/Button.tsx @@ -264,14 +264,15 @@ export const Button = forwardRef {variant === "fab" ? ( <> - - + + ) : ( {variant === "fab" ? ( <> - - + + ) : (