diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-20 07:36:48 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-20 07:36:48 +0100 |
| commit | fbc58df578544d30ba68b6bc11bfcdfeceed50ab (patch) | |
| tree | 1770f22f6716f51ce05f96c53acf4978e289eb4b /src | |
| parent | 4dd3cb79a6d6050ce1473aaf2ad565950fe6345b (diff) | |
Defines Button component
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> |
