diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/Button.astro | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/components/Button.astro b/src/components/Button.astro new file mode 100644 index 0000000..757eac2 --- /dev/null +++ b/src/components/Button.astro @@ -0,0 +1,18 @@ +--- +import type Digit from '$types/Digit'; + +type LayoutClasses = `grid-span-${Digit}` | `grid-span-${Digit} grid-end`; + +interface Props { + href: string; + layoutClasses: LayoutClasses; +} + +const { href, layoutClasses } = Astro.props; +--- + +<a class={`btn ${layoutClasses}`} href={href}> + <p> + <slot /> + </p> +</a> |
