impr: use custom tree-shakeable icon library
This commit is contained in:
7 files changed
+7
-11
No files matched your search
+2
-1
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "photon-lemmy",
|
||||
"version": "2.0.0",
|
||||
"license": "AGPL-3.0-only",
|
||||
"devDependencies": {
|
||||
"@dicebear/core": "^8.0.1",
|
||||
"@dicebear/initials": "^8.0.1",
|
||||
@@ -16,6 +17,7 @@
|
||||
"@tailwindcss/postcss": "^4.1.8",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/ua-parser-js": "^0.7.39",
|
||||
"@xylightdev/svelte-hero-icons": "^2.2.4",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-plugin-svelte": "^3.11.0",
|
||||
"jsdom": "^22.1.0",
|
||||
@@ -32,7 +34,6 @@
|
||||
"svelte-check": "^4.0.0",
|
||||
"svelte-floating-ui": "^1.5.9",
|
||||
"svelte-focus-trap": "^1.2.0",
|
||||
"svelte-hero-icons": "^5.2.0",
|
||||
"svelte-infinite-scroll": "^2.0.1",
|
||||
"svelte-markdown": "^0.4.1",
|
||||
"sveltekit-i18n": "^2.4.2",
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -43,6 +43,7 @@ const config = {
|
||||
},
|
||||
alias: {
|
||||
'mono-svelte': 'src/lib/mono',
|
||||
'svelte-hero-icons': 'node_modules/@xylightdev/svelte-hero-icons',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user