From 3c715c2e47575624c7ea096cd211e301fde90327 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Sat, 27 Sep 2025 20:00:20 +0300 Subject: Improve docs --- src/dompa/nodes.cljc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/dompa') diff --git a/src/dompa/nodes.cljc b/src/dompa/nodes.cljc index a434cf0..2453b88 100644 --- a/src/dompa/nodes.cljc +++ b/src/dompa/nodes.cljc @@ -109,9 +109,16 @@ (into [] ($->flat-xf) children)) (defmacro $ - "A helper that simplifies node creation. Particularly useful + "Creates a new node. Particularly useful where you need compile-time composition over run-time, like when - combined with the `defhtml` macro to create HTML string outputs." + combined with the `defhtml` macro to create HTML string outputs. + + Usage: + + ```clojure + ($ :div + ($ \"hello world\" )) + ```" [name & opts] `(if (string? ~name) {:node/name :dompa/text -- cgit v1.2.3