summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsko Nõmm <asko@nmm.ee>2025-09-27 20:00:20 +0300
committerAsko Nõmm <asko@nmm.ee>2025-09-27 20:00:20 +0300
commit3c715c2e47575624c7ea096cd211e301fde90327 (patch)
treea5b28804c402e3ef22aac596a60195846d1816a1
parentb6588785d7fa759fe4571f030322e05c85edc78c (diff)
Improve docs
-rw-r--r--src/dompa/nodes.cljc11
1 files changed, 9 insertions, 2 deletions
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