mirror of
https://github.com/penpot/penpot.git
synced 2025-02-23 23:35:58 -05:00
Merge pull request #5554 from penpot/eva-fix-token-status-icon
🐛 Fix token status icon id
This commit is contained in:
commit
ff4f0ca1d2
2 changed files with 4 additions and 4 deletions
|
@ -15,14 +15,14 @@
|
|||
(def ^:private schema:token-status-icon
|
||||
[:map
|
||||
[:class {:optional true} :string]
|
||||
[:id [:and :string [:fn #(contains? token-status-list %)]]]])
|
||||
[:icon-id [:and :string [:fn #(contains? token-status-list %)]]]])
|
||||
|
||||
(mf/defc token-status-icon*
|
||||
{::mf/props :obj
|
||||
::mf/schema schema:token-status-icon}
|
||||
[{:keys [id class] :rest props}]
|
||||
[{:keys [icon-id class] :rest props}]
|
||||
(let [class (dm/str (or class "") " " (stl/css :token-icon))
|
||||
props (mf/spread-props props {:class class :width "14px" :height "14px"})
|
||||
offset 0]
|
||||
[:> "svg" props
|
||||
[:use {:href (dm/str "#icon-" id) :width "14px" :height "14px" :x offset :y offset}]]))
|
||||
[:use {:href (dm/str "#icon-" icon-id) :width "14px" :height "14px" :x offset :y offset}]]))
|
||||
|
|
|
@ -26,6 +26,6 @@ For convenience, icons IDs are available in the component namespace.
|
|||
|
||||
```clj
|
||||
[:> token-status-icon*
|
||||
{:id ts/token-status-partial
|
||||
{:icon-id ts/token-status-partial
|
||||
:class (stl/css :token-pill-icon)}]
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue