🐛 Fix icon* component prop

This commit is contained in:
Eva Marco 2025-01-09 11:54:36 +01:00
parent 4bd1e32462
commit 5ee87018b9
19 changed files with 39 additions and 40 deletions

View file

@ -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