Created
May 26, 2021 12:37
-
-
Save katendeglory/e0867cdd870651ef1d339196a5c03d74 to your computer and use it in GitHub Desktop.
Tailwind custom file upload component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label | |
for="watch-photos" | |
class="flex items-center" | |
style="display: flex !important;" | |
> | |
<ion-icon name="images" class="text-2xl mr-3" /> | |
Upload Some Photos | |
</label> | |
{#if newWatch.photos} | |
<span class="text-red-300 my-1 text-sm tracking-wider"> | |
{newWatch.photos.length} Photo Selected | |
</span> | |
{/if} | |
<div class="hidden"> | |
<input | |
bind:files={newWatch.photos} | |
type="file" | |
multiple | |
placeholder="Passport" | |
accept="image/*" | |
id="watch-photos" | |
class="appearance-none" | |
/> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment