Makes company search work much more like the react one.

This commit is contained in:
2023-01-23 09:00:27 -08:00
parent 14b10963b8
commit 475a21530d
4 changed files with 107 additions and 42 deletions

View File

@@ -0,0 +1,14 @@
(ns auto-ap.ssr.components.navbar-dropdown
(:require [hiccup2.core :as hiccup]))
(defn navbar-dropdown [id header children]
[:div {
:id id
:class (str "navbar-item has-dropdown")
"_" (hiccup/raw "on click elsewhere remove .is-active from me")
}
[:a {:class "navbar-link login"
"_" (hiccup/raw "on click toggle .is-active on the parentElement of me then add .appear to next <.navbar-dropdown />")} header]
(into [:div {:class "navbar-dropdown"}
children])])