From 516d908cf7429f091966a33520deb89ee6cba24d Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Tue, 25 Jul 2023 19:03:06 -0700 Subject: [PATCH] fix: Fix colors not changing correctly --- src/lib/components/input/Button.svelte | 24 ++++++++++++++---------- src/lib/components/ui/Navbar.svelte | 3 ++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/lib/components/input/Button.svelte b/src/lib/components/input/Button.svelte index ce58237f..cbb003c9 100644 --- a/src/lib/components/input/Button.svelte +++ b/src/lib/components/input/Button.svelte @@ -56,21 +56,19 @@ const dispatch = createEventDispatcher() export let href: string | undefined = undefined - - let buttonClass = twMerge( - buttonColor[color], - buttonSize[size], - buttonRoundness[rounded], - 'text-sm transition-all disabled:!opacity-70 disabled:!pointer-events-none', - $$props.class - ) {#if href} dispatch('click', e)} - class="{buttonClass} {loading + class="{` + ${buttonColor[color]} + ${buttonSize[size]} + ${buttonRoundness[rounded]} + text-sm transition-all disabled:!opacity-70 disabled:!pointer-events-none + ${$$props.class} + `} {loading ? color == 'primary' ? '!bg-transparent !text-inherit' : '' diff --git a/src/lib/components/ui/Navbar.svelte b/src/lib/components/ui/Navbar.svelte index 5bddac20..53fff990 100644 --- a/src/lib/components/ui/Navbar.svelte +++ b/src/lib/components/ui/Navbar.svelte @@ -49,7 +49,8 @@