From 8e7e844d33b91256b078dfdad85d7b58730a7e53 Mon Sep 17 00:00:00 2001 From: LuckyFBB <976060700@qq.com> Date: Sun, 29 Sep 2024 17:46:12 +0800 Subject: [PATCH 1/2] fix(copy): change default copy icon --- src/copy/index.tsx | 19 +++++++++++++++++-- src/copy/style.scss | 4 ++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/copy/index.tsx b/src/copy/index.tsx index 71720b5e4..043ec32a5 100644 --- a/src/copy/index.tsx +++ b/src/copy/index.tsx @@ -1,5 +1,4 @@ import React, { CSSProperties, ReactNode } from 'react'; -import { CopyOutlined } from '@ant-design/icons'; import { message, Tooltip } from 'antd'; import classNames from 'classnames'; import useClippy from 'use-clippy'; @@ -16,9 +15,25 @@ export interface ICopyProps { onCopy?: (text: string) => void; } +// 后续迁移了 icon 库之后,可以直接从 icon 中引入 +const CopyIcon = () => ( + + + + + +); + const Copy: React.FC = (props) => { const { - button = , + button = , text, tooltip = '复制', style, diff --git a/src/copy/style.scss b/src/copy/style.scss index 382c7f3b1..7d7af8465 100644 --- a/src/copy/style.scss +++ b/src/copy/style.scss @@ -1,7 +1,7 @@ .dtc-copy { display: inline-block; cursor: pointer; - &__default-icon:hover { - color: #58ABF9; + &__default-icon { + color: #1D78FF; } } From 31fdf2d45a2a175acac119f417a8bccfd8610da3 Mon Sep 17 00:00:00 2001 From: LuckyFBB <976060700@qq.com> Date: Fri, 25 Oct 2024 17:02:48 +0800 Subject: [PATCH 2/2] fix(copy): change default copy icon --- src/copy/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/copy/index.tsx b/src/copy/index.tsx index 043ec32a5..867bb2cfa 100644 --- a/src/copy/index.tsx +++ b/src/copy/index.tsx @@ -22,8 +22,8 @@ const CopyIcon = () => ( viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" - width="16" - height="16" + width="1em" + height="1em" fill="currentColor" >