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

how to remove margin/padding between alert boxes? #83

Closed mgrabmair closed 3 years ago

mgrabmair commented 8 years ago

This one may be very simple but I cannot get it to work. How can I narrow/remove the space between alerts in an alert-list. I have tried putting the following ...

:style {:margin-bottom "0px"}

and/or

:style {:padding-bottom "0px"}

... into both the list and the box, but it does not do anything. Can someone help?

superstructor commented 3 years ago

If provided on the alert-list use the alert-style argument like:

[alert-list
   :alert-style {:margin-bottom "0"}
   :alerts ...]

Prior to 67a6815 :style on individual :alerts in a alert-list were ignored, as :alert-style was being passed through instead. I agree that is confusing and unexpected so as of 67a6815 it is fixed by merging :alert-style with :style for every alert in a alert-list.

[alert-list
   :alerts [{ ... :style {:margin-bottom "0"} ...]]