(defcomp (&key (name :as string) (syntax :as string) (doc :as string) (tail-position :as string) (example :as string)) (div (~tw :tokens "not-prose border border-stone-200 rounded-lg p-4 space-y-3") (div (~tw :tokens "flex items-baseline gap-3") (code (~tw :tokens "text-lg font-bold text-violet-700") name) (when (not (= tail-position "none")) (span (~tw :tokens "text-xs px-2 py-0.5 rounded-full bg-green-100 text-green-700") "TCO"))) (when (not (= syntax "")) (pre (~tw :tokens "bg-stone-100 rounded px-3 py-2 text-sm font-mono text-stone-700 overflow-x-auto") syntax)) (p (~tw :tokens "text-stone-600 text-sm whitespace-pre-line") doc) (when (not (= tail-position "")) (p (~tw :tokens "text-xs text-stone-500") (span (~tw :tokens "font-semibold") "Tail position: ") tail-position)) (when (not (= example "")) (~docs/code :src (highlight example "lisp")))))