0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

📎 Fix react warning on icon* component

This commit is contained in:
Belén Albeza 2024-07-04 09:47:11 +02:00
parent 4ac18e2ef0
commit c52da573c5

View file

@ -253,7 +253,7 @@
{::mf/props :obj}
[{:keys [icon size class] :rest props}]
(let [class (dm/str (or class "") " " (stl/css :icon))
props (mf/spread props {:class class :width icon-size-m :height icon-size-m})
props (mf/spread-props props {:class class :width icon-size-m :height icon-size-m})
size-px (cond (= size "s") icon-size-s :else icon-size-m)
offset (/ (- icon-size-m size-px) 2)]
[:> "svg" props