fix: Make icons in navbar square
This commit is contained in:
1 parent
e6c46f3463
commit
b8e1c16a8d
3 files changed
+15
-8
No files matched your search
@@ -75,12 +75,14 @@
|
|||||||
? '!bg-transparent !text-inherit'
|
? '!bg-transparent !text-inherit'
|
||||||
: ''
|
: ''
|
||||||
: ''} {loading
|
: ''} {loading
|
||||||
? ' !border border-slate-300 bg-slate-200 dark:border-zinc-700 dark:bg-zinc-800'
|
? ' !border !border-slate-300 !bg-slate-200 dark:!border-zinc-700 dark:!bg-zinc-800'
|
||||||
: ''} {$$props.disabled ? 'opacity-70 pointer-events-none' : ''}"
|
: ''} {$$props.disabled ? 'opacity-70 pointer-events-none' : ''}"
|
||||||
>
|
>
|
||||||
<div class="flex flex-row items-center justify-center gap-1.5">
|
<div class="flex flex-row items-center justify-center gap-1.5 h-full">
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<Spinner />
|
<Spinner
|
||||||
|
width={size == 'lg' ? 20 : size == 'md' ? 18 : size == 'sm' ? 16 : 16}
|
||||||
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<slot name="icon" />
|
<slot name="icon" />
|
||||||
{/if}
|
{/if}
|
||||||
@@ -92,7 +94,7 @@
|
|||||||
disabled={loading}
|
disabled={loading}
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click={(e) => dispatch('click', e)}
|
on:click={(e) => dispatch('click', e)}
|
||||||
class="{buttonClass} {loading
|
class="{buttonClass} {loading
|
||||||
? color == 'primary'
|
? color == 'primary'
|
||||||
? '!bg-transparent !text-inherit'
|
? '!bg-transparent !text-inherit'
|
||||||
: ''
|
: ''
|
||||||
|
|||||||
@@ -46,7 +46,11 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row gap-2 py-2 px-3">
|
<div class="flex flex-row gap-2 py-2 px-3">
|
||||||
<Button href="/communities" label="Communities">
|
<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"
|
||||||
|
>
|
||||||
<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>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -56,6 +60,7 @@
|
|||||||
slot="button"
|
slot="button"
|
||||||
label="Create"
|
label="Create"
|
||||||
on:click={toggleOpen}
|
on:click={toggleOpen}
|
||||||
|
class="max-sm:w-9 max-sm:h-8 max-sm:!p-0"
|
||||||
>
|
>
|
||||||
<Icon src={Plus} width={18} mini slot="icon" />
|
<Icon src={Plus} width={18} mini slot="icon" />
|
||||||
<span class="hidden sm:inline">Create</span>
|
<span class="hidden sm:inline">Create</span>
|
||||||
@@ -67,7 +72,7 @@
|
|||||||
</MenuButton>
|
</MenuButton>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
<Menu let:toggleOpen alignment="bottom-right">
|
<Menu let:toggleOpen alignment="bottom-right" itemsClass="!h-8">
|
||||||
<button
|
<button
|
||||||
class="w-8 h-8 rounded-full ring-1 ring-slate-300 bg-slate-100
|
class="w-8 h-8 rounded-full ring-1 ring-slate-300 bg-slate-100
|
||||||
dark:bg-zinc-800 relative"
|
dark:bg-zinc-800 relative"
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<div
|
<div
|
||||||
class="overflow-visible {absolute
|
class="overflow-visible {absolute
|
||||||
? 'absolute'
|
? 'absolute'
|
||||||
: 'relative'} cursor-auto {clazz}"
|
: 'relative'} cursor-auto {clazz} {itemsClass}"
|
||||||
bind:this={element}
|
bind:this={element}
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
role="menu"
|
role="menu"
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
)}
|
)}
|
||||||
rounded-md py-2 min-w-[16rem] my-2 flex flex-col shadow-md
|
rounded-md py-2 min-w-[16rem] my-2 flex flex-col shadow-md
|
||||||
bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800
|
bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800
|
||||||
{itemsClass}"
|
"
|
||||||
>
|
>
|
||||||
{#if open}
|
{#if open}
|
||||||
<div on:click={toggleOpen} class="flex flex-col gap-0">
|
<div on:click={toggleOpen} class="flex flex-col gap-0">
|
||||||
|
|||||||
Reference in new issue
Block a user