misc: Minor tweaks
This commit is contained in:
1 parent
12d4a9d9de
commit
f3c3982eff
4 files changed
+27
-10
No files matched your search
@@ -2,6 +2,7 @@
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { Color } from '$lib/ui/colors.js'
|
||||
import Loading from '$lib/components/ui/loader/Loading.svelte'
|
||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
||||
|
||||
export let color: Color = Color.secondary
|
||||
export let loading = false
|
||||
@@ -9,6 +10,7 @@
|
||||
export let disabled = false
|
||||
export let submit = false
|
||||
export let label: string = ''
|
||||
export let spinner = false
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
</script>
|
||||
@@ -29,5 +31,13 @@
|
||||
<slot name="icon" />
|
||||
<slot />
|
||||
</div>
|
||||
<div class="mx-auto py-2" class:hidden={!loading}><Loading /></div>
|
||||
<div class="mx-auto" class:hidden={!loading}>
|
||||
{#if spinner}
|
||||
<Spinner />
|
||||
{:else}
|
||||
<div class="py-2">
|
||||
<Loading />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</button>
|
||||
Reference in new issue
Block a user