day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
797 stars 146 forks source link

h-box acts like v-box #135

Closed mgrabmair closed 7 years ago

mgrabmair commented 7 years ago

I am using this code below with figwheel & devcards and I get the h-box acting like a v-box, i.e. foo and bar are vertically arranged. What am I doing wrong?


(defn test-element []
  (fn []
    [v-box
     :children [[box :style {:background "green"} :child "header"]
                [h-box
                 :width "100%"
                 :height "100px"
                 :size "none"
                 :children 
                 [[box :style {:background "blue"} 
                   :size "100px"
                   :child "foo"]
                  [box :style {:background "red"} 
                   :size "1"
                   :child "bar"]]]]]))

(defcard test-card
  (r/as-element [test-element]))
Gregg8 commented 7 years ago

The best place for these types of issues is in the support forums, such as http://clojurians.net or https://groups.google.com/forum/#!forum/clojurescript

Having said that, I pasted your test-element fn into my own test app and it rendered as expected, so I think there must be some kind of conflict with devcards.

mgrabmair commented 7 years ago

Thanks!