Themes: add 'link' as builtin, available Icon

This commit is contained in:
Pieter Vander Vennet 2024-01-16 04:17:59 +01:00
parent f8644dd4ad
commit 7872f22151
2 changed files with 4 additions and 0 deletions

View file

@ -137,6 +137,7 @@ export default class Constants {
"close",
"heart",
"heart_outline",
"link",
] as const
public static readonly defaultPinIcons: string[] = <any>Constants._defaultPinIcons

View file

@ -31,6 +31,7 @@
import Mastodon from "../../assets/svg/Mastodon.svelte"
import Party from "../../assets/svg/Party.svelte"
import AddSmall from "../../assets/svg/AddSmall.svelte"
import { LinkIcon } from "@babeard/svelte-heroicons/mini"
/**
* Renders a single icon.
@ -114,6 +115,8 @@
<Party {color} class={clss} />
{:else if icon === "addSmall"}
<AddSmall {color} class={clss} />
{:else if icon === "link"}
<LinkIcon class={clss}/>
{:else}
<img class={clss ?? "h-full w-full"} src={icon} aria-hidden="true" alt="" />
{/if}