blog.z0x.ca/src/components/SocialIcons.astro
z0x 36870785bc
All checks were successful
build dist / build-dist (push) Successful in 32s
refactor: biome lint
2025-04-24 22:12:22 -04:00

37 lines
837 B
Text

---
import Link from "@/components/Link.astro";
import { buttonVariants } from "@/components/ui/button";
import { ICON_MAP } from "@/consts";
import type { SocialLink } from "@/types";
import { Icon } from "astro-icon/components";
interface Props {
links: SocialLink[];
}
const { links } = Astro.props;
---
<ul class="flex flex-wrap gap-2" role="list">
{
links.map(({ href, label }) => (
<li>
<Link
href={href}
aria-label={label}
title={label}
class={buttonVariants({ variant: 'outline', size: 'icon' })}
external
>
<Icon
name={
ICON_MAP[label as keyof typeof ICON_MAP] ||
'lucide:message-circle-question'
}
class="size-4"
/>
</Link>
</li>
))
}
</ul>