Something went wrong. Try again.
Personal website raffaelelungarella.dev
Something went wrong. Try again.
123456789101112131415161718192021222324252627---import type { HTMLAttributes } from "astro/types";
type Variant = "brand" | "header" | "underline" | "muted";
interface Props extends HTMLAttributes<"a"> { variant?: Variant; active?: boolean;}
const { variant = "header", active, class: className, ...attrs } = Astro.props;
const variants: Record<Variant, string> = { brand: "text-ink", header: "border-transparent px-2 py-1.5 hover:border-edge-strong hover:text-gray-11 data-active:border-accent data-active:no-underline text-gray-9 data-active:text-ink", underline: "text-ink underline decoration-ink-dimmer decoration-2 hover:decoration-ink", muted: "text-ink-dim hover:text-ink hover:underline",};---<a class:list={[variants[variant], className, "font-sans"]} data-active={active || undefined} aria-current={variant === "header" && active ? "page" : undefined} {...attrs}><slot /></a>