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()
|
const dispatch = createEventDispatcher()
|
||||||
export let href: string | undefined = undefined
|
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>
|
</script>
|
||||||
|
|
||||||
{#if href}
|
{#if href}
|
||||||
<a
|
<a
|
||||||
{href}
|
{href}
|
||||||
{...$$restProps}
|
{...$$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'
|
? color == 'primary'
|
||||||
? '!bg-transparent !text-inherit'
|
? '!bg-transparent !text-inherit'
|
||||||
: ''
|
: ''
|
||||||
@@ -94,7 +92,13 @@
|
|||||||
disabled={loading}
|
disabled={loading}
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click={(e) => dispatch('click', e)}
|
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'
|
? color == 'primary'
|
||||||
? '!bg-transparent !text-inherit'
|
? '!bg-transparent !text-inherit'
|
||||||
: ''
|
: ''
|
||||||
|
|||||||
@@ -49,7 +49,8 @@
|
|||||||
<Button
|
<Button
|
||||||
href="/communities"
|
href="/communities"
|
||||||
label="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" />
|
<Icon src={GlobeAlt} width={16} slot="icon" />
|
||||||
<span class="hidden sm:inline">Explore</span>
|
<span class="hidden sm:inline">Explore</span>
|
||||||
|
|||||||
Reference in new issue
Block a user