From 9dc25975407964feb1a68aafaf372c0cfbe16820 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Mon, 17 Feb 2025 15:19:59 +0700 Subject: [PATCH] chore: update ui width text field slider, and conditional button copy for hgf token (#4661) --- web/containers/SliderRightPanel/index.tsx | 2 +- .../SettingDetailTextInputItem/index.tsx | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/web/containers/SliderRightPanel/index.tsx b/web/containers/SliderRightPanel/index.tsx index 3fad10212..5022845c9 100644 --- a/web/containers/SliderRightPanel/index.tsx +++ b/web/containers/SliderRightPanel/index.tsx @@ -73,7 +73,7 @@ const SliderRightPanel = ({ trigger={ @@ -118,11 +119,13 @@ type InputActionProps = { onAction: (action: InputAction) => void copied: boolean obscure: boolean + value: string | string[] } const InputExtraActions: React.FC = ({ actions, onAction, + value, copied, obscure, }) => { @@ -141,11 +144,15 @@ const InputExtraActions: React.FC = ({ className="text-green-600" /> ) : ( - onAction('copy')} - /> + <> + {value.length > 0 && ( + onAction('copy')} + /> + )} + ) case 'unobscure':