Pārlūkot izejas kodu

fix(ux): compatiable herf for the classical ui button component

charlie 1 gadu atpakaļ
vecāks
revīzija
f5bf5a4bfb
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      src/main/frontend/ui.cljs

+ 5 - 0
src/main/frontend/ui.cljs

@@ -1046,6 +1046,11 @@
                 button-props)
 
         icon (when icon (shui-ui/tabler-icon icon icon-props))
+        href? (not (string/blank? href))
+        text (cond
+               href? [:a {:href href :target "_blank"
+                          :style {:color "inherit"}} text]
+               :else text)
         children [icon text]]
 
     (shui-ui/button props children)))