mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2024-12-22 14:35:38 +01:00
Add input component
This commit is contained in:
parent
d6ca0d469a
commit
62da6eda45
1 changed files with 19 additions and 0 deletions
19
src/components/Input.svelte
Normal file
19
src/components/Input.svelte
Normal file
|
@ -0,0 +1,19 @@
|
|||
<script>
|
||||
import Icon from './Icon.svelte';
|
||||
|
||||
export let icon;
|
||||
export let placeholder;
|
||||
|
||||
export let value = '';
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="flex flex-1 relative items-center bg-item rounded-2xl h-14 focus-within:border-primary border-2 border-transparent ease-in duration-100">
|
||||
{#if icon}
|
||||
<Icon path={icon} color="white" className="absolute ml-4 w-6 h-6" />
|
||||
{/if}
|
||||
<input
|
||||
{placeholder}
|
||||
bind:value
|
||||
class="w-full pl-12 pr-4 text-white placeholder-gray-500 leading-none bg-transparent border-none focus:outline-none" />
|
||||
</div>
|
Loading…
Reference in a new issue