Add input component

pull/1/head
I Made Setia Baruna 2020-10-24 00:36:12 +07:00
parent d6ca0d469a
commit 62da6eda45
1 changed files with 19 additions and 0 deletions

View 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>