refac
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
export let name: string | undefined = undefined;
|
||||
|
||||
let show = false;
|
||||
|
||||
const highContrastInputClass =
|
||||
'rounded-lg border border-gray-100/50 bg-gray-50/40 px-2 py-1.5 text-gray-700 outline-hidden transition-colors placeholder:text-gray-300 focus:border-blue-400 dark:border-white/[0.04] dark:bg-white/[0.03] dark:text-gray-300 dark:placeholder:text-gray-700 dark:focus:border-blue-500';
|
||||
</script>
|
||||
|
||||
<div class={outerClassName}>
|
||||
@@ -24,7 +27,7 @@
|
||||
{/if}
|
||||
<input
|
||||
{id}
|
||||
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'}`}
|
||||
class={`${inputClassName} ${show ? '' : 'password'} ${($settings?.highContrastMode ?? false) ? highContrastInputClass : ' outline-hidden placeholder:text-gray-300 dark:placeholder:text-gray-600'}`}
|
||||
{placeholder}
|
||||
type={type === 'password' && !show ? 'password' : 'text'}
|
||||
bind:value
|
||||
|
||||
Reference in New Issue
Block a user