fix: Fix colors not changing correctly
This commit is contained in:
1 parent
9a6a8f5cd5
commit
516d908cf7
2 files changed
+16
-11
No files matched your search
@@ -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
|
||||
)
|
||||
</script>
|
||||
|
||||
{#if href}
|
||||
<a
|
||||
{href}
|
||||
{...$$restProps}
|
||||
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'
|
||||
: ''
|
||||
@@ -94,7 +92,13 @@
|
||||
disabled={loading}
|
||||
{...$$restProps}
|
||||
on:click={(e) => 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'
|
||||
: ''
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
<Button
|
||||
href="/communities"
|
||||
label="Communities"
|
||||
class="max-sm:w-9 max-sm:h-8 max-sm:!p-0 items-center justify-center text-zinc-400"
|
||||
class="max-sm:w-9 max-sm:h-8 max-sm:!p-0 items-center justify-center
|
||||
dark:text-zinc-300 text-slate-700 hover:text-inherit"
|
||||
>
|
||||
<Icon src={GlobeAlt} width={16} slot="icon" />
|
||||
<span class="hidden sm:inline">Explore</span>
|
||||
|
||||
Reference in new issue
Block a user