refac: styling

This commit is contained in:
Timothy J. Baek 2024-07-17 22:01:32 +02:00
parent 1e7a364c68
commit 8b71ce23bb
2 changed files with 8 additions and 2 deletions

View File

@ -100,7 +100,12 @@
{#if file.type === 'image'} {#if file.type === 'image'}
<img src={file.url} alt="input" class=" max-h-96 rounded-lg" draggable="false" /> <img src={file.url} alt="input" class=" max-h-96 rounded-lg" draggable="false" />
{:else} {:else}
<FileItem url={file.url} name={file.name} type={file.type} /> <FileItem
url={file.url}
name={file.name}
type={file.type}
colorClassName="bg-white dark:bg-gray-850 "
/>
{/if} {/if}
</div> </div>
{/each} {/each}

View File

@ -5,6 +5,7 @@
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
export let className = 'w-72'; export let className = 'w-72';
export let colorClassName = 'bg-white dark:bg-gray-800';
export let url: string | null = null; export let url: string | null = null;
export let clickHandler: Function | null = null; export let clickHandler: Function | null = null;
@ -18,7 +19,7 @@
<div class="relative group"> <div class="relative group">
<button <button
class="h-14 {className} flex items-center space-x-3 bg-white dark:bg-gray-800 rounded-xl border border-gray-100 dark:border-gray-800 text-left" class="h-14 {className} flex items-center space-x-3 {colorClassName} rounded-xl border border-gray-100 dark:border-gray-800 text-left"
type="button" type="button"
on:click={async () => { on:click={async () => {
if (clickHandler === null) { if (clickHandler === null) {