impr: button consistency
This commit is contained in:
3 files changed
+9
-6
No files matched your search
@@ -4,6 +4,7 @@
|
||||
import type { ButtonProps } from 'mono-svelte/button/Button.svelte'
|
||||
import type { Snippet } from 'svelte'
|
||||
import { Icon, type IconSource } from 'svelte-hero-icons/dist'
|
||||
import type { ClassValue } from 'svelte/elements'
|
||||
|
||||
interface Props extends ButtonProps {
|
||||
label: string
|
||||
@@ -11,7 +12,7 @@
|
||||
href?: string | undefined
|
||||
adaptive?: boolean
|
||||
isSelectedFilter?: (path: string) => boolean
|
||||
class?: string
|
||||
class?: ClassValue
|
||||
customIcon?: Snippet<[{ size: number; isSelected?: boolean }]>
|
||||
children?: Snippet
|
||||
}
|
||||
@@ -34,7 +35,7 @@
|
||||
<Button
|
||||
{...rest}
|
||||
color="none"
|
||||
rounding="xl"
|
||||
rounding="none"
|
||||
class={[
|
||||
'nav-btn',
|
||||
adaptive && 'nav-btn-dynamic',
|
||||
@@ -80,6 +81,7 @@
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
border-radius: var(--radius-xl);
|
||||
width: calc(var(--spacing) * 10);
|
||||
height: calc(var(--spacing) * 10);
|
||||
@variant md {
|
||||
|
||||
@@ -40,7 +40,10 @@
|
||||
icon={Home}
|
||||
href="/"
|
||||
label={$t('nav.home')}
|
||||
class="logo border-0 md:rounded-full! md:w-10! md:h-10 md:px-0! -order-1"
|
||||
class={[
|
||||
'logo border-0 md:w-10! md:h-10 md:px-0! -order-1',
|
||||
!LINKED_INSTANCE_URL ? 'md:rounded-full!' : 'rounded-none!',
|
||||
]}
|
||||
adaptive={false}
|
||||
>
|
||||
{#snippet customIcon()}
|
||||
|
||||
Reference in new issue
Block a user