summaryrefslogtreecommitdiff
path: root/src/components/Button.astro
blob: 9cc38854eaf1239f99fbeba1421c11ef318a4508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
import type Digit from '$types/Digit';

type LayoutClasses = `grid-span-${Digit}${'' | ' grid-end' | ' grid-prose-end'}`;

interface Props {
  href: string;
  layoutClasses: LayoutClasses;
}

const { href, layoutClasses } = Astro.props;
---

<a class={`btn ${layoutClasses}`} href={href}>
  <p>
    <slot />
  </p>
</a>