1import type { Html, HtmlBuilder } from "foldkit/html";
2
3// A plain Foldkit view function styled with Tailwind utility classes.
4export const card = <Message>(
5 h: HtmlBuilder<Message>,
6 props: { title: string; body: string },
7): Html =>
8 h.div(
9 [
10 h.Class(
11 "mt-6 max-w-md rounded-xl border border-slate-200 bg-white p-6 shadow-sm",
12 ),
13 ],
14 [
15 h.h2([h.Class("text-lg font-semibold")], [props.title]),
16 h.p([h.Class("mt-2 text-slate-600")], [props.body]),
17 ],
18 );