mirror of
https://github.com/penpot/penpot.git
synced 2025-06-25 17:37:00 +02:00
💄 Fix indentation on shapes/bool component
This commit is contained in:
parent
48e5e86b73
commit
c3c2d88245
1 changed files with 23 additions and 23 deletions
|
@ -17,30 +17,30 @@
|
||||||
(defn bool-shape
|
(defn bool-shape
|
||||||
[shape-wrapper]
|
[shape-wrapper]
|
||||||
(mf/fnc bool-shape
|
(mf/fnc bool-shape
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[props]
|
[props]
|
||||||
(let [shape (obj/get props "shape")
|
(let [shape (obj/get props "shape")
|
||||||
childs (obj/get props "childs")
|
childs (obj/get props "childs")
|
||||||
childs (use-equal-memo childs)
|
childs (use-equal-memo childs)
|
||||||
include-metadata? (mf/use-ctx use/include-metadata-ctx)
|
include-metadata? (mf/use-ctx use/include-metadata-ctx)
|
||||||
|
|
||||||
bool-content
|
bool-content
|
||||||
(mf/use-memo
|
(mf/use-memo
|
||||||
(mf/deps shape childs)
|
(mf/deps shape childs)
|
||||||
(fn []
|
(fn []
|
||||||
(cond
|
(cond
|
||||||
(some? (:bool-content shape))
|
(some? (:bool-content shape))
|
||||||
(:bool-content shape)
|
(:bool-content shape)
|
||||||
|
|
||||||
(some? childs)
|
(some? childs)
|
||||||
(gsh/calc-bool-content shape childs))))]
|
(gsh/calc-bool-content shape childs))))]
|
||||||
|
|
||||||
[:*
|
[:*
|
||||||
(when (some? bool-content)
|
(when (some? bool-content)
|
||||||
[:& path-shape {:shape (assoc shape :content bool-content)}])
|
[:& path-shape {:shape (assoc shape :content bool-content)}])
|
||||||
|
|
||||||
(when include-metadata?
|
(when include-metadata?
|
||||||
[:> "penpot:bool" {}
|
[:> "penpot:bool" {}
|
||||||
(for [item (->> (:shapes shape) (mapv #(get childs %)))]
|
(for [item (->> (:shapes shape) (mapv #(get childs %)))]
|
||||||
[:& shape-wrapper {:shape item
|
[:& shape-wrapper {:shape item
|
||||||
:key (dm/str (:id item))}])])])))
|
:key (dm/str (:id item))}])])])))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue