mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
💄 Add minor cosmetic changes to custom-stroke react component
This commit is contained in:
parent
8b57dcf015
commit
260879791b
1 changed files with 4 additions and 10 deletions
|
@ -282,17 +282,11 @@
|
||||||
|
|
||||||
(mf/defc outer-stroke
|
(mf/defc outer-stroke
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[props]
|
[{:keys [children shape stroke index]}]
|
||||||
|
(let [shape-id (dm/get-prop shape :id)
|
||||||
(let [child (unchecked-get props "children")
|
|
||||||
shape (unchecked-get props "shape")
|
|
||||||
stroke (unchecked-get props "stroke")
|
|
||||||
index (unchecked-get props "index")
|
|
||||||
|
|
||||||
shape-id (dm/get-prop shape :id)
|
|
||||||
render-id (mf/use-ctx muc/render-id)
|
render-id (mf/use-ctx muc/render-id)
|
||||||
|
|
||||||
props (obj/get child "props")
|
props (obj/get children "props")
|
||||||
style (obj/get props "style")
|
style (obj/get props "style")
|
||||||
|
|
||||||
stroke-width (:stroke-width stroke 0)
|
stroke-width (:stroke-width stroke 0)
|
||||||
|
@ -305,7 +299,7 @@
|
||||||
[:g.outer-stroke-shape
|
[:g.outer-stroke-shape
|
||||||
[:defs
|
[:defs
|
||||||
[:& stroke-defs {:shape shape :stroke stroke :render-id render-id :index index}]
|
[:& stroke-defs {:shape shape :stroke stroke :render-id render-id :index index}]
|
||||||
(let [type (obj/get child "type")
|
(let [type (obj/get children "type")
|
||||||
style (-> (obj/clone style)
|
style (-> (obj/clone style)
|
||||||
(obj/unset! "fill")
|
(obj/unset! "fill")
|
||||||
(obj/unset! "fillOpacity")
|
(obj/unset! "fillOpacity")
|
||||||
|
|
Loading…
Add table
Reference in a new issue