              (spinner)))]))
 
 (defn button-primary
+
+  "Primary button. See http://getbootstrap.com/css/#buttons
+
+  Arguments:
+
+  See `button`."
+
   [& args]
   (let [[attrs [& rest-args]] (resolve-args :button-primary {:class "btn-primary"} args)]
     (apply button attrs rest-args)))
 
 (defn button-default
+
+  "Default button. See http://getbootstrap.com/css/#buttons
+
+  Arguments:
+
+  See `button`."
+
+
   [& args]
   (let [[attrs [& rest-args]] (resolve-args :button-default {:class "btn-default"} args)]
     (apply button attrs rest-args)))
 
 (defn button-group
+
+  "Button group.
+
+  Arguments:
+
+  [attrs] button-1 ... button-n
+
+  attrs        - (optional) attributes handed over to React (see https://github.com/r0man/sablono#html-attributes)"
+
   [& args]
   (let [[attrs [& buttons]] (resolve-args :button-group {:class "button-group"} args)]
     [:div attrs (seq buttons)]))
 
 (defn checkbox
+
+  "Checkbox. See http://getbootstrap.com/css/#checkboxes-and-radios
+
+  Arguments:
+
+  [attrs] label cursor korks value [:valid? <bool> :validation-error-fn <lambda> :inline <bool>]
+
+  attrs                 - (optional) attributes handed over to React (see https://github.com/r0man/sablono#html-attributes)
+  label                 - the label; a string or Hiccup/Sablono style template
+  cursor, korks         - data to bind to
+  :inline               - (optional) if true renders the control inline
+  :valid?               - (optional) if false shows a validation error; internal
+  :validation-error-fn  - (optional) lambda <korks> -> <error message>; internal"
+
   [& args]
   (let [[attrs [label cursor korks & {:keys [valid? validation-error-fn inline]}]] (resolve-args :checkbox {} args)
         dom-id (gen-dom-id cursor korks)

                                  :value    (get-in cursor korks)})]
    (input* :input input-attrs label cursor korks opts)))

(defn html5-input
  [type & args]
  (let [[attrs [label placeholder cursor korks & opts]] (resolve-args type {} args)]
    (apply html5-input* attrs label placeholder cursor korks (name type) opts)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Public

(defn panel
  [& args]
  (let [[attrs [title & rest-args]] (resolve-args :panel {:class "panel panel-default"} args)
        [{:keys [close]} [& contents]] (parse-options rest-args)]



(defn textarea

  "Textarea element. See http://getbootstrap.com/css/#textarea

  Arguments:

  [attrs] label placeholder cursor korks [opts]

  attrs                 - (optional) attributes handed over to React (see https://github.com/r0man/sablono#html-attributes)
  label                 - the label; a string or Hiccup/Sablono style template
  placeholder           - placeholder text shown if there is no value
  cursor, korks         - data to bind to
  opts                  - see `html5-input`


  Example:

  (f/textarea \"Textarea\" \"A placeholder\" data [:some-text])
  (f/textarea {:rows 8} \"Textarea\" \"A placeholder\" data [:some-text] :inline true)"

  [& args]
  (js/console.log (prn-str args))
  (let [[attrs [label placeholder cursor korks & opts]] (resolve-args :textarea {:class "form-control"} args)
