troylusty.com/src/components/Button.astro

20 lines
489 B
Text
Raw Normal View History

2025-01-17 22:16:14 +00:00
---
type Props = {
href: String;
link: String;
class?: string;
2025-01-17 22:16:14 +00:00
};
const { href, link, class: additionalClasses } = Astro.props;
const baseClasses =
"bg-tertiary text-primary hover:bg-accent flex w-fit flex-row items-center gap-1 justify-self-center rounded-md px-2 py-1 text-center text-sm font-medium text-nowrap capitalize";
const combinedClasses = `${baseClasses} ${additionalClasses || ""}`;
2025-01-17 22:16:14 +00:00
---
<a href={`${href}`}>
<div class={combinedClasses}>
2025-01-17 22:16:14 +00:00
{link}
</div>
</a>