design: improve file attachments
This commit is contained in:
4 files changed
+82
-67
No files matched your search
@@ -34,13 +34,12 @@
|
||||
</Label>
|
||||
{/if}
|
||||
<label
|
||||
class="flex flex-col items-center px-8 py-4 mx-auto w-full rounded-xl
|
||||
border border-slate-200 dark:border-zinc-800 bg-white dark:bg-black
|
||||
cursor-pointer min-h-36 transition-colors {dragover
|
||||
? 'border-sky-500 text-sky-500'
|
||||
: ''}
|
||||
{url != undefined ? 'rounded-b-none' : ''}
|
||||
"
|
||||
class={[
|
||||
'flex flex-col items-center justify-center px-8 py-4 mx-auto w-full rounded-xl',
|
||||
'border border-slate-200 dark:border-zinc-800 border-dashed hover:border-slate-300 hover:dark:border-zinc-700',
|
||||
'cursor-pointer min-h-36 transition-colors bg-white dark:bg-zinc-950',
|
||||
dragover && 'border-sky-500 text-sky-500',
|
||||
]}
|
||||
ondrop={event => {
|
||||
event.preventDefault()
|
||||
files = event.dataTransfer?.files ?? null
|
||||
@@ -68,8 +67,13 @@
|
||||
class="w-full max-w-sm h-full rounded-lg"
|
||||
/>
|
||||
{:else}
|
||||
<Icon src={DocumentPlus} class="opacity-50" size="36" />
|
||||
<p class="text-sm opacity-50">Attach a file</p>
|
||||
<Icon
|
||||
src={DocumentPlus}
|
||||
class="text-slate-400 dark:text-zinc-500"
|
||||
size="36"
|
||||
solid
|
||||
/>
|
||||
<p class="text-slate-600 dark:text-zinc-400 font-medium">Attach a file</p>
|
||||
{/if}
|
||||
<input type="file" bind:files {accept} class="hidden" />
|
||||
</label>
|
||||
|
||||
Reference in new issue
Block a user