You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since components should no longer have any outside/external "[harmful margin](harmful margin)", there is an even greater need than before for a helper of some type to provide consistent vertical spacing between elements.
The most common solution for this is a Stack component, as popularized by Braid Design System and others.
In essence, this component accepts children and a spacing prop (mapping to our spacing tokens). When rendered, this component will place the spacing amount provided by spacing between the children.
This would render three buttons, each with appropriate margin or padding spacing these equally apart vertically. The first would not have unnecessary top spacing applied, the last would not have unnecessary bottom spacing applied.
We should also update the style guidelines to include a blurb about not using outside margin when styling components.
The text was updated successfully, but these errors were encountered:
Since components should no longer have any outside/external "[harmful margin](harmful margin)", there is an even greater need than before for a helper of some type to provide consistent vertical spacing between elements.
The most common solution for this is a Stack component, as popularized by Braid Design System and others.
In essence, this component accepts children and a
spacing
prop (mapping to our spacing tokens). When rendered, this component will place the spacing amount provided byspacing
between the children.For example:
This would render three buttons, each with appropriate margin or padding spacing these equally apart vertically. The first would not have unnecessary top spacing applied, the last would not have unnecessary bottom spacing applied.
We should also update the style guidelines to include a blurb about not using outside margin when styling components.
The text was updated successfully, but these errors were encountered: