This commit is contained in:
Timothy Jaeryang Baek
2026-02-25 13:12:34 -06:00
parent e3f21d6c3b
commit 9dff497abf

View File

@@ -12,6 +12,7 @@
export let inputClassName = 'w-full text-sm py-0.5 bg-transparent';
export let showButtonClassName = 'pl-1.5 transition bg-transparent';
export let screenReader = true;
export let autocomplete = 'off';
let show = false;
</script>
@@ -25,13 +26,10 @@
class={`${inputClassName} ${show ? '' : 'password'} ${($settings?.highContrastMode ?? false) ? 'placeholder:text-gray-700 dark:placeholder:text-gray-100' : ' outline-hidden placeholder:text-gray-300 dark:placeholder:text-gray-600'}`}
{placeholder}
type={type === 'password' && !show ? 'password' : 'text'}
{value}
bind:value
required={required && !readOnly}
disabled={readOnly}
on:change={(e) => {
value = e.target.value;
}}
autocomplete="off"
{autocomplete}
/>
<button
class={showButtonClassName}