diff options
| author | aman333nolawz <amananudhiu@gmail.com> | 2026-03-02 21:49:13 +0530 |
|---|---|---|
| committer | aman333nolawz <amananudhiu@gmail.com> | 2026-03-02 21:49:13 +0530 |
| commit | d41eff9eccf66644c4c60f53cb516bf079937a28 (patch) | |
| tree | 248a0863a3181369f943d678ec4273911d35efac /src/components/SocialIcons.astro | |
Using astro-erudite for static site generation
Diffstat (limited to 'src/components/SocialIcons.astro')
| -rw-r--r-- | src/components/SocialIcons.astro | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/components/SocialIcons.astro b/src/components/SocialIcons.astro new file mode 100644 index 0000000..236bb6a --- /dev/null +++ b/src/components/SocialIcons.astro @@ -0,0 +1,37 @@ +--- +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> |
