Closed bassmartin closed 7 years ago
Great thinking I love it
After some thinking I think going with this may be the best option.
row.withMargin(Normal,Small,None,Small)
The boolean at the end of the margin calls have been replaced. Use MarginType.None
for the margin instead
setMargin(MarginType.Normal, ResponsiveColumn.DisplaySize.XS);
setMargin(MarginType.Small, ResponsiveColumn.DisplaySize.SM);
setMargin(MarginType.None, ResponsiveColumn.DisplaySize.MD);
It's great to have the possibility to set margins to be hidden on some screen sizes, but I think the
withMargin
should be more fluent, like the ResponsiveColumn visibility :public ResponsiveRow withMargin(MarginSize size, boolean xs, boolean sm, boolean md, boolean lg)
That way you can have something like :
row.withMargin(MarginSize.NORMAL, false, false, true, true).withMargin(MarginSize.SMALL, true, true, false, false)
What do you think?