troylusty.com/src/components/Button.astro
Troy 8df8272d6d
feat: add interactivity with alpinejs (#34)
* first stages of implementing alpinejs

* add link to projects slideshow

* begin adding nav bar

* inpired hero from flaco theme

* fix posts showcase

fixed to publish current work to latest

* revert docker action

* update astro version
2025-02-12 13:03:43 +00:00

19 lines
489 B
Text

---
type Props = {
href: String;
link: String;
class?: string;
};
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 || ""}`;
---
<a href={`${href}`}>
<div class={combinedClasses}>
{link}
</div>
</a>