mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 21:06:11 +02:00
feat(frontend): initial work on react and rumext upgrade
This commit is contained in:
parent
ff00bdb3eb
commit
88f45fb618
33 changed files with 184 additions and 144 deletions
|
@ -154,6 +154,31 @@
|
|||
[]
|
||||
(partition 2 params))))
|
||||
|
||||
;; (defn normalize-attrs
|
||||
;; [m]
|
||||
;; (letfn [(transform [[k v]]
|
||||
;; (cond
|
||||
;; (or (= k :class) (= k :class-name))
|
||||
;; ["className" v]
|
||||
|
||||
;; (or (keyword? k) (string? k))
|
||||
;; [(str/camel (name k)) v]
|
||||
|
||||
;; :else
|
||||
;; [k v]))
|
||||
;; (walker [x]
|
||||
;; (if (map? x)
|
||||
;; (into {} (map tf) x)
|
||||
;; x))]
|
||||
;; (walk/postwalk walker m)))
|
||||
|
||||
(defn normalize-props
|
||||
[props]
|
||||
(clj->js props :keyword-fn (fn [key]
|
||||
(if (or (= key :class) (= key :class-name))
|
||||
"className"
|
||||
(str/camel (name key))))))
|
||||
|
||||
|
||||
;; (defmacro mirror-map [& fields]
|
||||
;; (let [keys# (map #(keyword (name %)) fields)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue