mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
✨ Adds synchronization for typography
This commit is contained in:
parent
718a676fa8
commit
7248b168fa
3 changed files with 167 additions and 96 deletions
11
frontend/src/app/util/text.cljs
Normal file
11
frontend/src/app/util/text.cljs
Normal file
|
@ -0,0 +1,11 @@
|
|||
(ns app.util.text)
|
||||
|
||||
(defn some-node
|
||||
[predicate node]
|
||||
(or (predicate node)
|
||||
(some #(some-node predicate %) (:children node))))
|
||||
|
||||
(defn map-node
|
||||
[map-fn node]
|
||||
(cond-> (map-fn node)
|
||||
(:children node) (update :children (fn [children] (mapv #(map-node map-fn %) children)))))
|
Loading…
Add table
Add a link
Reference in a new issue