fix: search input issues

This commit is contained in:
Konstantinos Kaloutas
2022-08-23 21:38:21 +03:00
committed by Tienson Qin
parent fac1180a07
commit 322e3a730a
7 changed files with 85 additions and 58 deletions

View File

@@ -166,7 +166,7 @@
opts))
(defn button
[text & {:keys [background href class intent on-click small? large?]
[text & {:keys [background href class intent on-click small? large? title]
:or {small? false large? false}
:as option}]
(let [klass (when-not intent ".bg-indigo-600.hover:bg-indigo-700.focus:border-indigo-700.active:bg-indigo-700.text-center")
@@ -176,6 +176,7 @@
[:button.ui__button
(merge
{:type "button"
:title title
:class (str (util/hiccup->class klass) " " class)}
(dissoc option :background :class :small? :large?)
(when href
@@ -274,6 +275,11 @@
[]
(gdom/getElement "main-content-container"))
(defn focus-element
[element]
(when-let [element ^js (gdom/getElement element)]
(.focus element)))
(defn get-scroll-top []
(.-scrollTop (main-node)))