From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/base/copy-feedback/index.tsx | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/app/components/base/copy-feedback/index.tsx b/app/components/base/copy-feedback/index.tsx
index 18ebe03..ead1eb1 100644
--- a/app/components/base/copy-feedback/index.tsx
+++ b/app/components/base/copy-feedback/index.tsx
@@ -1,15 +1,10 @@
'use client'
import React, { useState } from 'react'
import { useTranslation } from 'react-i18next'
-import {
- RiClipboardFill,
- RiClipboardLine,
-} from '@remixicon/react'
import { debounce } from 'lodash-es'
import copy from 'copy-to-clipboard'
import copyStyle from './style.module.css'
import Tooltip from '@/app/components/base/tooltip'
-import ActionButton from '@/app/components/base/action-button'
type Props = {
content: string
@@ -18,7 +13,7 @@
const prefixEmbedded = 'appOverview.overview.appInfo.embedded'
-const CopyFeedback = ({ content }: Props) => {
+const CopyFeedback = ({ content, className }: Props) => {
const { t } = useTranslation()
const [isCopied, setIsCopied] = useState<boolean>(false)
@@ -39,15 +34,19 @@
: t(`${prefixEmbedded}.copy`)) || ''
}
>
- <ActionButton>
+ <div
+ className={`w-8 h-8 cursor-pointer hover:bg-gray-100 rounded-lg ${
+ className ?? ''
+ }`}
+ >
<div
onClick={onClickCopy}
onMouseLeave={onMouseLeave}
- >
- {isCopied && <RiClipboardFill className='h-4 w-4' />}
- {!isCopied && <RiClipboardLine className='h-4 w-4' />}
- </div>
- </ActionButton>
+ className={`w-full h-full ${copyStyle.copyIcon} ${
+ isCopied ? copyStyle.copied : ''
+ }`}
+ ></div>
+ </div>
</Tooltip>
)
}
@@ -76,13 +75,15 @@
}
>
<div
- className={`h-8 w-8 cursor-pointer rounded-lg hover:bg-components-button-ghost-bg-hover ${className ?? ''
+ className={`w-8 h-8 cursor-pointer hover:bg-gray-100 rounded-lg ${
+ className ?? ''
}`}
>
<div
onClick={onClickCopy}
onMouseLeave={onMouseLeave}
- className={`h-full w-full ${copyStyle.copyIcon} ${isCopied ? copyStyle.copied : ''
+ className={`w-full h-full ${copyStyle.copyIcon} ${
+ isCopied ? copyStyle.copied : ''
}`}
></div>
</div>
--
Gitblit v1.8.0