(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])])
