fix: remove redundant wrapper div in password field
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,27 +52,25 @@ export function ScriptParameterField({ param, value, error, disabled }: Props) {
|
|||||||
} else if (param.type === 'password') {
|
} else if (param.type === 'password') {
|
||||||
errorRenderedByComponent = true
|
errorRenderedByComponent = true
|
||||||
input = (
|
input = (
|
||||||
<div className="flex flex-col gap-1">
|
<div className="relative">
|
||||||
<div className="relative">
|
<Input
|
||||||
<Input
|
id={id}
|
||||||
id={id}
|
type={showPassword ? 'text' : 'password'}
|
||||||
type={showPassword ? 'text' : 'password'}
|
value={value}
|
||||||
value={value}
|
onChange={handleChange}
|
||||||
onChange={handleChange}
|
placeholder={param.placeholder ?? undefined}
|
||||||
placeholder={param.placeholder ?? undefined}
|
disabled={disabled}
|
||||||
disabled={disabled}
|
error={error}
|
||||||
error={error}
|
/>
|
||||||
/>
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onClick={() => setShowPassword(v => !v)}
|
||||||
onClick={() => setShowPassword(v => !v)}
|
className="absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground"
|
||||||
className="absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground"
|
tabIndex={-1}
|
||||||
tabIndex={-1}
|
aria-label={showPassword ? 'Hide password' : 'Show password'}
|
||||||
aria-label={showPassword ? 'Hide password' : 'Show password'}
|
>
|
||||||
>
|
{showPassword ? <EyeOff size={14} /> : <Eye size={14} />}
|
||||||
{showPassword ? <EyeOff size={14} /> : <Eye size={14} />}
|
</button>
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
} else if (param.type === 'textarea') {
|
} else if (param.type === 'textarea') {
|
||||||
|
|||||||
Reference in New Issue
Block a user