From e0bce2d71d8f28f3846fddef98e77bace351d9ec Mon Sep 17 00:00:00 2001 From: Andrew Rouse Date: Fri, 11 Sep 2026 14:22:05 +0100 Subject: [PATCH] fix: Operation copy-to-clipboard icon visibility. Fix the doubling of the copy-to-clipboard icon by removing the inner svg element, and just leaving the button background. Allow the copy button to shrink to being invisible by removing its padding. Clean up the unused CopyIcon component. --- src/core/components/copy-to-clipboard-btn.jsx | 6 +--- src/core/plugins/icons/components/copy.jsx | 34 ------------------- src/core/plugins/icons/index.js | 2 -- src/style/_buttons.scss | 1 + 4 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 src/core/plugins/icons/components/copy.jsx diff --git a/src/core/components/copy-to-clipboard-btn.jsx b/src/core/components/copy-to-clipboard-btn.jsx index 2147b3ccccc..017f03a827b 100644 --- a/src/core/components/copy-to-clipboard-btn.jsx +++ b/src/core/components/copy-to-clipboard-btn.jsx @@ -13,8 +13,6 @@ export default class CopyToClipboardBtn extends React.Component { render() { let { getComponent } = this.props - const CopyIcon = getComponent("CopyIcon") - return (
- - + />
) diff --git a/src/core/plugins/icons/components/copy.jsx b/src/core/plugins/icons/components/copy.jsx deleted file mode 100644 index b4079d41bf3..00000000000 --- a/src/core/plugins/icons/components/copy.jsx +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @prettier - */ -import React from "react" -import PropTypes from "prop-types" - -const Copy = ({ className = null, width = 15, height = 16, ...rest }) => ( - -) - -Copy.propTypes = { - className: PropTypes.string, - width: PropTypes.string, - height: PropTypes.string, -} - -export default Copy diff --git a/src/core/plugins/icons/index.js b/src/core/plugins/icons/index.js index a70c8a889ea..5f94bba3888 100644 --- a/src/core/plugins/icons/index.js +++ b/src/core/plugins/icons/index.js @@ -5,7 +5,6 @@ import ArrowUpIcon from "./components/arrow-up" import ArrowDownIcon from "./components/arrow-down" import ArrowIcon from "./components/arrow" import CloseIcon from "./components/close" -import CopyIcon from "./components/copy" import LockIcon from "./components/lock" import UnlockIcon from "./components/unlock" @@ -15,7 +14,6 @@ const IconsPlugin = () => ({ ArrowDownIcon, ArrowIcon, CloseIcon, - CopyIcon, LockIcon, UnlockIcon, }, diff --git a/src/style/_buttons.scss b/src/style/_buttons.scss index 23f35eddbc3..dac4a22e91e 100644 --- a/src/style/_buttons.scss +++ b/src/style/_buttons.scss @@ -169,6 +169,7 @@ button { height: 25px; background: url("data:image/svg+xml, ") center center no-repeat; + padding: 0; @media (forced-colors: active) { forced-color-adjust: none;