chore: update ui width text field slider, and conditional button copy for hgf token (#4661)
This commit is contained in:
parent
929fc579ec
commit
9dc2597540
@ -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}
|
||||||
|
|||||||
@ -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"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
<>
|
||||||
|
{value.length > 0 && (
|
||||||
<CopyIcon
|
<CopyIcon
|
||||||
key={action}
|
key={action}
|
||||||
size={16}
|
size={16}
|
||||||
onClick={() => onAction('copy')}
|
onClick={() => onAction('copy')}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
case 'unobscure':
|
case 'unobscure':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user