[READ-ONLY] Mirror of https://github.com/flo-bit/dogumentation. Simple, minimalistic documentation template using astro
flo-bit.dev/dogumentation/
655 B
25 lines
1---
2import type { HTMLAttributes } from "astro/types";
3
4type Props = HTMLAttributes<"button"> & HTMLAttributes<"a">;
5
6const { class: className, ...props } = Astro.props;
7
8const classes = [
9 "not-prose inline-flex items-center gap-2 text-xs font-medium bg-base-100 dark:bg-base-900 text-base-950 dark:text-base-100 px-3 py-1.5 rounded-full",
10 "border border-base-200 dark:border-base-800 hover:bg-base-200 dark:hover:bg-base-800 transition-colors duration-200",
11 className,
12];
13---
14
15{
16 props.href ? (
17 <a class:list={classes} {...props}>
18 <slot />
19 </a>
20 ) : (
21 <button class:list={classes} {...props}>
22 <slot />
23 </button>
24 )
25}