impr: use custom tree-shakeable icon library
This commit is contained in:
7 files changed
+7
-11
No files matched your search
@@ -180,7 +180,7 @@
|
||||
animations={{ scale: true, large: true }}
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon src={EllipsisHorizontal} width={16} micro />
|
||||
<Icon src={EllipsisHorizontal} size="16" micro />
|
||||
{/snippet}
|
||||
</Button>
|
||||
{/snippet}
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
</MenuButton>
|
||||
<MenuButton onclick={() => report(post)} color="danger-subtle">
|
||||
{#snippet prefix()}
|
||||
<Icon src={Flag} width={16} micro />
|
||||
<Icon src={Flag} size="16" micro />
|
||||
{/snippet}
|
||||
{$t('moderation.report')}
|
||||
</MenuButton>
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
interface Props extends ButtonProps {
|
||||
href?: string | undefined
|
||||
icon?: IconSource | undefined
|
||||
selected?: boolean
|
||||
class?: string
|
||||
customIcon?: import('svelte').Snippet<[{ selected: boolean }]>
|
||||
children?: import('svelte').Snippet
|
||||
@@ -17,7 +16,6 @@
|
||||
let {
|
||||
href = undefined,
|
||||
icon = undefined,
|
||||
selected = $bindable(false),
|
||||
class: clazz = '',
|
||||
customIcon,
|
||||
children,
|
||||
@@ -25,11 +23,7 @@
|
||||
...rest
|
||||
}: Props = $props()
|
||||
|
||||
$effect(() => {
|
||||
if (href != undefined) {
|
||||
selected = page.url.pathname == href
|
||||
}
|
||||
})
|
||||
let selected = $derived(page.url.pathname == href)
|
||||
</script>
|
||||
|
||||
<Button
|
||||
|
||||
@@ -135,7 +135,7 @@ items-center px-2 w-max top-6 lg:top-22"
|
||||
color="primary"
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon src={Check} width={16} mini />
|
||||
<Icon src={Check} size="16" mini />
|
||||
{/snippet}
|
||||
{$t('routes.inbox.markAsRead')}
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user