oliverdavies.uk/src/components/Button.astro

22 lines
569 B
Text
Raw Normal View History

2023-04-21 14:36:24 +01:00
---
interface Props {
href: string;
position?: string;
2023-04-21 14:36:24 +01:00
text: string;
2023-04-25 01:09:10 +01:00
}
2023-04-21 14:36:24 +01:00
const { href, position, text } = Astro.props as Props;
2023-04-21 14:36:24 +01:00
---
2023-04-25 01:09:10 +01:00
2023-10-23 00:51:19 +01:00
<div
class="mt-6 not-prose"
class:list={[position === "centre" ? "flex justify-center" : null]}
>
2023-04-21 14:36:24 +01:00
<a
2023-07-14 08:23:08 +01:00
class="inline-flex justify-center items-center py-3 px-6 w-full text-base font-medium text-white no-underline rounded-md duration-200 ease-in-out md:w-auto hover:bg-white focus:bg-white bg-blue-primary transition-color hover:text-blue-primary focus:text-blue-primary"
2023-04-21 14:36:24 +01:00
href={href}
>
{text} &rarr;
</a>
</div>