fix(ui): remove spaces for the tabler icon names

feat/asset-sync
charlie 2024-07-09 12:10:53 +08:00
parent f3888e4509
commit 405dfa8300
1 changed files with 13 additions and 12 deletions

View File

@ -97,18 +97,19 @@
(rum/defc icon-cp < rum/static
[icon {:keys [on-chosen hover]}]
[:button.w-9.h-9.transition-opacity
{:key icon
:tabIndex "0"
:title icon
:on-click (fn [e]
(on-chosen e {:type :tabler-icon
:id icon
:name icon}))
:on-mouse-over #(reset! hover {:type :tabler-icon
:id icon
:name icon
:icon icon})
:on-mouse-out #()}
(when-let [icon (if (string? icon) (string/replace icon " " "") icon)]
{:key icon
:tabIndex "0"
:title icon
:on-click (fn [e]
(on-chosen e {:type :tabler-icon
:id icon
:name icon}))
:on-mouse-over #(reset! hover {:type :tabler-icon
:id icon
:name icon
:icon icon})
:on-mouse-out #()})
(ui/icon icon {:size 24})])
(rum/defc icons-cp < rum/static