feat: Add new-password autocomplete to hideText input in TextInput.svelte

This commit is contained in:
kwaroran
2024-06-27 00:28:02 +09:00
parent f94ff18f01
commit 07bafce2f8

View File

@@ -2,6 +2,7 @@
<!-- Since svelte doesn't allow two-way binding for dynamic types, we use this -->
{#if hideText}
<!-- new-password disables autofill -->
<input
class={"border border-darkborderc peer focus:border-borderc rounded-md shadow-sm text-textcolor bg-transparent focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((className) ? (' ' + className) : '')}
class:text-sm={size === 'sm'}
@@ -22,7 +23,7 @@
class:h-full={fullh}
class:text-textcolor2={disabled}
{autocomplete}
autocomplete="new-password"
{placeholder}
id={id}
type="password"