2023-12-15 23:13:59 +00:00
|
|
|
<script lang="ts">
|
2024-12-09 05:26:51 +00:00
|
|
|
import type { Snippet } from "svelte";
|
2023-12-15 23:13:59 +00:00
|
|
|
|
2024-12-04 17:37:49 +00:00
|
|
|
interface Props {
|
|
|
|
|
ariaLabel: string;
|
|
|
|
|
href: string;
|
|
|
|
|
clazz?: string;
|
|
|
|
|
itemText: string;
|
2024-12-09 05:26:51 +00:00
|
|
|
icon?: Snippet;
|
|
|
|
|
children?: any;
|
2024-12-04 17:37:49 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 05:26:51 +00:00
|
|
|
let { ariaLabel, href, clazz = '', itemText, icon, children }: Props = $props();
|
2023-12-15 23:13:59 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<a
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noreferrer"
|
|
|
|
|
aria-label={ariaLabel}
|
|
|
|
|
{href}
|
|
|
|
|
class={clazz}
|
|
|
|
|
>
|
2024-12-09 05:26:51 +00:00
|
|
|
{#if icon}
|
|
|
|
|
{@render icon?.()}
|
|
|
|
|
{/if}
|
|
|
|
|
{@render children?.()}
|
2023-12-15 23:13:59 +00:00
|
|
|
<p>{itemText}</p>
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<style lang="postcss">
|
|
|
|
|
a {
|
|
|
|
|
display: grid;
|
|
|
|
|
justify-items: center;
|
|
|
|
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
padding: 0.3rem;
|
|
|
|
|
margin-left: 1rem;
|
|
|
|
|
color: var(--lightGrey);
|
|
|
|
|
|
|
|
|
|
& p {
|
|
|
|
|
font-size: 1.5rem;
|
|
|
|
|
padding-top: 0.3rem;
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
color: var(--shellYellow);
|
|
|
|
|
& p {
|
|
|
|
|
color: var(--shellYellow);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-09 05:26:51 +00:00
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
2023-12-15 23:13:59 +00:00
|
|
|
</style>
|