fix(web): resolve key-value input box height inconsistency on focus/blur (#30715) (#30716)

This commit is contained in:
Rhon Joe 2026-01-08 09:54:27 +08:00 committed by GitHub
parent 25ff4ae5da
commit 27a803a6f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -59,12 +59,12 @@ const InputItem: FC<Props> = ({
}, [onRemove])
return (
<div className={cn(className, 'hover:cursor-text hover:bg-state-base-hover', 'relative flex h-full')}>
<div className={cn(className, 'hover:cursor-text hover:bg-state-base-hover', 'relative flex !h-[30px] items-center')}>
{(!readOnly)
? (
<Input
instanceId={instanceId}
className={cn(isFocus ? 'bg-components-input-bg-active' : 'bg-width', 'w-0 grow px-3 py-1')}
className={cn(isFocus ? 'bg-components-input-bg-active' : 'bg-width', 'h-full w-0 grow px-3 py-1')}
value={value}
onChange={onChange}
readOnly={readOnly}
@ -79,13 +79,13 @@ const InputItem: FC<Props> = ({
)
: (
<div
className="h-[18px] w-full pl-0.5 leading-[18px]"
className="h-full w-full pl-0.5 leading-[18px]"
>
{!hasValue && <div className="text-xs font-normal text-text-quaternary">{placeholder}</div>}
{hasValue && (
<Input
instanceId={instanceId}
className={cn(isFocus ? 'border-components-input-border-active bg-components-input-bg-active shadow-xs' : 'border-components-input-border-hover bg-components-input-bg-normal', 'w-0 grow rounded-lg border px-3 py-[6px]')}
className={cn(isFocus ? 'border-components-input-border-active bg-components-input-bg-active shadow-xs' : 'border-components-input-border-hover bg-components-input-bg-normal', 'h-full w-0 grow rounded-lg border px-3 py-[6px]')}
value={value}
onChange={onChange}
readOnly={readOnly}