mirror of
https://github.com/penpot/penpot.git
synced 2025-05-16 16:56:12 +02:00
🐛 Fix icon* component prop
This commit is contained in:
parent
4bd1e32462
commit
5ee87018b9
19 changed files with 39 additions and 40 deletions
|
@ -84,7 +84,7 @@ However, we might want to control the aspect of the icons, or limit which icons
|
|||
[{:keys [icon children] :rest props}]
|
||||
(assert (or (nil? icon) (contains? valid-icon-list icon) "expected valid icon id"))
|
||||
[:> "button" props
|
||||
(when icon [:> icon* {:id icon :size "m"}])
|
||||
(when icon [:> icon* {:icon-id icon :size "m"}])
|
||||
children])
|
||||
```
|
||||
|
||||
|
@ -160,7 +160,7 @@ Nested styles for DOM elements that are not instantiated by our component should
|
|||
[{:keys [icon children class] :rest props}]
|
||||
(let [props (mf/spread-props props {:class (stl/css :button)})]
|
||||
[:> "button" props
|
||||
(when icon [:> icon* {:id icon :size "m"}])
|
||||
(when icon [:> icon* {:icon-id icon :size "m"}])
|
||||
[:span {:class (stl/css :label-wrapper)} children]]))
|
||||
|
||||
;; later in code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue