Files
portfolio/src/components/Token.astro
Nathan Cummins 1f45a74b2a
All checks were successful
Build and Deploy to Web Server / deploy (push) Successful in 18m1s
Some corrections with types and undeleted file
2025-08-14 09:48:52 +09:30

32 lines
586 B
Plaintext

---
import type { HTMLAttributes } from "astro/types";
interface Props extends HTMLAttributes<"span"> {
colour?: String;
textColour?: String;
size?: String;
hover?: String;
}
const {
colour = "bg-primary",
textColour = "text-white",
size = "text-xs",
hover = "hover:bg-white hover:text-primary hover:ring-primary hover:ring-2",
class: className,
...attrs
} = Astro.props as Props;
---
<span
class:list={[
"inline-block rounded px-2 py-1 font-bold uppercase",
colour,
textColour,
className,
size,
hover
]}
{...attrs}><slot /></span
>