misc: Change loading size

This commit is contained in:
Xyphyn committed 2023-07-22 16:09:34 -07:00
1 parent fd3bc2dda3
commit da65dec43a
2 files changed
+9 -4

No files matched your search

+6 -3
View File
@@ -15,7 +15,8 @@
secondary:
'border border-slate-200 dark:border-zinc-700 bg-transparent hover:bg-slate-100 hover:dark:bg-zinc-800',
tertiary: 'bg-transparent hover:bg-slate-100 hover:dark:bg-zinc-800',
tertiary:
'border border-transparent bg-transparent hover:bg-slate-100 hover:dark:bg-zinc-800',
danger:
'border border-red-500 bg-red-500 hover:text-red-500 hover:bg-transparent text-white',
@@ -60,7 +61,7 @@
buttonColor[color],
buttonSize[size],
buttonRoundness[rounded],
'text-sm transition-all disabled:opacity-70 disabled:pointer-events-none',
'text-sm transition-all disabled:!opacity-70 disabled:!pointer-events-none',
$$props.class
)
</script>
@@ -102,7 +103,9 @@
>
<div class="flex flex-row items-center justify-center gap-1.5">
{#if loading}
<Spinner width={20} />
<Spinner
width={size == 'lg' ? 20 : size == 'md' ? 18 : size == 'sm' ? 16 : 16}
/>
{:else}
<slot name="icon" />
{/if}
@@ -80,11 +80,13 @@
{/if}
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
<div
class="my-2 min-w-[7rem] w-max h-8 border-l-2 border-slate-200 dark:border-zinc-900 ml-2.5 pl-0.5"
class="my-2 min-w-[7rem] w-max h-8 border-l-2 border-slate-200 dark:border-zinc-900 ml-2.5 pl-1"
>
<Button
loading={node.loading}
disabled={node.loading}
size="sm"
color="tertiary"
on:click={() => {
node.loading = true
fetchChildren(node).then(() => (node.loading = false))