                place-anchor-before?    (case orientation (:left :above) false true)
                flex-flow               (case orientation (:left :right) "row" "column")]
            [:div
-            {:class  "rc-popover-anchor-wrapper display-inline-flex"
-             :style (merge (flex-child-style "inherit")
-                           style)}
+            (merge {:class (str "rc-popover-anchor-wrapper display-inline-flex " class)
+                    :style (merge (flex-child-style "inherit")
+                                  style)}
+                   attr)
             [:div                                ;; Wrapper around the anchor and the "point"
              {:class "rc-point-wrapper display-inline-flex"
               :style (merge (flex-child-style "auto")


       :reagent-render
       (fn
         [& {:keys [showing-injected? position-injected position-offset no-clip? width height backdrop-opacity on-cancel title close-button? body tooltip-style? popover-color arrow-length arrow-width arrow-gap padding style]
             :or {arrow-length 11 arrow-width 22 arrow-gap -1}
             :as args}]
         {:pre [(validate-args-macro popover-content-wrapper-args-desc args "popover-content-wrapper")]}

         @position-injected ;; Dereference this atom. Although nothing here needs its value explicitly, the calculation of left-offset and top-offset are affected by it for :no-clip? true
         [:div.popover-content-wrapper
          {:style (merge (flex-child-style "inherit")
                         (when no-clip? {:position "fixed"
                                         :left      (px @left-offset)
                                         :top       (px @top-offset)})
                         style)}
          (when (and @showing-injected? on-cancel)
            [backdrop
             :opacity  backdrop-opacity

   {:name :position :required true                        :type "keyword"         :validate-fn position?         :description [:span "relative to this anchor. One of " position-options-list]}
   {:name :anchor   :required true                        :type "string | hiccup" :validate-fn string-or-hiccup? :description "the component the popover is attached to"}
   {:name :popover  :required true                        :type "string | hiccup" :validate-fn string-or-hiccup? :description "the popover body component"}
   {:name :class    :required false                       :type "string"          :validate-fn string?           :description "CSS class names, space separated"}
   {:name :style    :required false                       :type "CSS style map"   :validate-fn css-style?        :description "override component style(s) with a style map, only use in case of emergency"}
   {:name :attr     :required false                       :type "HTML attr map"   :validate-fn html-attr?        :description [:span "HTML attributes, like " [:code ":on-mouse-move"] [:br] "No " [:code ":class"] " or " [:code ":style"] "allowed"]}])

(defn popover-anchor-wrapper
  "Renders an element or control along with a Bootstrap popover"
