   []
   (fn []
     [:div.form-group
-     [:div.row
-      [:div.col-md-12
+     [:div.row [:div.col-md-12
        [:button.btn.btn-info {:on-click (fn [_] (swap! show-edit not))} "Show/Hide edit form"]
        [:div.p (str "Preview: " (or @edit-tea-snap "*no tea selected*") " -> " (or @edit-tea "*no tea selected*"))]
        [:div.p]

                    .-target
                    .-value)))

(def sync-new-tea (partial sync-atom-to-event new-tea))
(def sync-edit-tea (partial sync-atom-to-event edit-tea))

(defn tea-adder
  "A component for the tea-adder form"
  []
  (fn []
    [:div.row
     [:div.col-md-12
      [:form {:post "/api/newtea"}
       [:input.form-control {:field :text :id :in-tea :placeholder "Name of New Tea" :value @new-tea :on-change sync-new-tea }
        [:input.btn.btn-primary {:type "submit" :value (str "Add " @new-tea) :on-click #(post-to-teas-db @new-tea)}]]]]]))




  [tea-name]
  ;; (println "post-to-teas-db hit, params: " tea-name)
  (ajax/POST "/api/newtea" {:params {:new-tea tea-name} :format :json}
             :handler (fn [] (println "New Tea Posted") (get-teas))
             :error-handler (fn [err] (println "New Tea Failed To Post" err))))


