WIP! A BB-style forum, on the ATmosphere!
We're still working... we'll be back soon when we have something to show off!
node
typescript
hono
htmx
atproto
1import type { FC, PropsWithChildren } from "hono/jsx";
2
3type ButtonVariant = "primary" | "secondary" | "danger";
4
5interface ButtonProps {
6 variant: ButtonVariant;
7 href?: string;
8 type?: "button" | "submit" | "reset";
9}
10
11export const Button: FC<PropsWithChildren<ButtonProps>> = ({
12 variant,
13 href,
14 type = "button",
15 children,
16}) => {
17 const classes = `btn btn-${variant}`;
18 if (href) {
19 return <a href={href} class={classes}>{children}</a>;
20 }
21 return <button type={type} class={classes}>{children}</button>;
22};