You can now print and pay

This commit is contained in:
Bryce Covert
2019-02-21 22:22:36 -08:00
parent 9c6fbaf963
commit 00e2c64317
7 changed files with 197 additions and 60 deletions

View File

@@ -13,14 +13,19 @@
(fn [children]
children)})))
(defn drop-down [{:keys [ header id]} child]
(defn drop-down [{:keys [ header id is-right? class]} child]
(let [menu-active? (re-frame/subscribe [::subs/menu-active? id])]
(r/create-class
{:reagent-render (fn [{:keys [header id]} child]
{:reagent-render (fn [{:keys [header id is-right? class] :or {:is-right? true}} child]
(let [menu-active? @(re-frame/subscribe [::subs/menu-active? id])]
[:div.dropdown.is-right {:class (if menu-active?
"is-active"
"")}
[:div.dropdown {:class (str (if menu-active?
"is-active"
"") " "
(if is-right?
"is-right"
"")
" "
class)}
[:div.dropdown-trigger header]
[appearing {:visible? menu-active? :enter-class "appear" :exit-class "disappear" :timeout 200}
@@ -28,6 +33,5 @@
[:div.dropdown-content
(when menu-active?
[drop-down-contents {:id id}
child])]]]
]))})))
child])]]]]))})))