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={
<Input
type="text"
className="-mt-4 h-8 w-[60px]"
className="-mt-4 h-8 w-[68px]"
min={min}
max={max}
value={val}

View File

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