diff --git a/src/components/CopyButton.tsx b/src/components/CopyButton.tsx index fcc57e6..64b5314 100644 --- a/src/components/CopyButton.tsx +++ b/src/components/CopyButton.tsx @@ -1,8 +1,7 @@ import React, { useEffect, useRef, useState } from 'react'; import { Check, Copy } from 'lucide-react'; import { copyTextToClipboard } from '@/utils/clipboard'; -import { cn } from '@/lib/utils'; -import { buttonVariants, type ButtonProps } from '@/components/ui/button'; +import { Button, type ButtonProps } from '@/components/ui/button'; import { toast } from 'sonner'; interface CopyButtonProps extends Omit { @@ -47,17 +46,14 @@ export const CopyButton: React.FC = ({ }; return ( - + ); }; diff --git a/src/components/SwitchButtonGroup.tsx b/src/components/SwitchButtonGroup.tsx index 7333727..b0e425d 100644 --- a/src/components/SwitchButtonGroup.tsx +++ b/src/components/SwitchButtonGroup.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; export interface SwitchOption { @@ -45,21 +46,20 @@ export default function SwitchButtonGroup({ {...props} > {options.map((option) => ( - + ))} ); diff --git a/src/components/TextInputArea.tsx b/src/components/TextInputArea.tsx index 8031803..58e79a9 100644 --- a/src/components/TextInputArea.tsx +++ b/src/components/TextInputArea.tsx @@ -3,6 +3,7 @@ import { X } from 'lucide-react'; import { cn } from '@/lib/utils'; import { toast } from 'sonner'; // 推荐使用 shadcn 的默认 Toast import { CopyButton } from '@/components/CopyButton'; +import { Button } from './ui/button'; export type ValidateRule = { validator: (value: string) => boolean; @@ -273,14 +274,16 @@ const TextInputArea = forwardRef((props )} {showClear && value && !disabled && !readOnly && ( - + )}