Add context option to heading component #4510
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Adds a context option to the heading component, to mimic the behaviour of context on the page title component.
This also removes the 'with mobile top margin' option from the component, as we're trying to move away from margin top on components. Instead, this spacing will be applied to previous elements on a case by case basis, in further pull requests.
mobile_top_margin
are limited to government-frontendWhy
We're removing the margin_top option from the title component (#4508) and there are some places where this is still needed. However if the heading component has context, those instances can be replaced with the heading component.
Eventually we're also working towards merging the title component into the heading component, and this is also a step in that direction.
Visual Changes
None, apart from the new options on the heading component.
Trello card: https://trello.com/c/l4VyD7Nm/395-retire-page-title-component