chore: update ui width text field slider, and conditional button copy for hgf token (#4661)

This commit is contained in:
Faisal Amir 2025-02-17 15:19:59 +07:00 committed by GitHub
parent 929fc579ec
commit 9dc2597540
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View File

@ -73,7 +73,7 @@ const SliderRightPanel = ({
trigger={ trigger={
<Input <Input
type="text" type="text"
className="-mt-4 h-8 w-[60px]" className="-mt-4 h-8 w-[68px]"
min={min} min={min}
max={max} max={max}
value={val} value={val}

View File

@ -102,6 +102,7 @@ const SettingDetailTextInputItem = ({
<InputExtraActions <InputExtraActions
actions={inputActions ?? []} actions={inputActions ?? []}
onAction={onAction} onAction={onAction}
value={value}
copied={copied} copied={copied}
obscure={obscure} obscure={obscure}
/> />
@ -118,11 +119,13 @@ type InputActionProps = {
onAction: (action: InputAction) => void onAction: (action: InputAction) => void
copied: boolean copied: boolean
obscure: boolean obscure: boolean
value: string | string[]
} }
const InputExtraActions: React.FC<InputActionProps> = ({ const InputExtraActions: React.FC<InputActionProps> = ({
actions, actions,
onAction, onAction,
value,
copied, copied,
obscure, obscure,
}) => { }) => {
@ -141,11 +144,15 @@ const InputExtraActions: React.FC<InputActionProps> = ({
className="text-green-600" className="text-green-600"
/> />
) : ( ) : (
<CopyIcon <>
key={action} {value.length > 0 && (
size={16} <CopyIcon
onClick={() => onAction('copy')} key={action}
/> size={16}
onClick={() => onAction('copy')}
/>
)}
</>
) )
case 'unobscure': case 'unobscure':