feat: Restore wrapping of items in Page Menu #1145
Merged
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.
The Page Menu was always meant to wrap its items if they don’t fit on a single line, but this behaviour got removed when interfering with the responsiveness of Header. The consequence that a larger Page Menu in the Footer now breaks the page layout was recently filed as a bug.
This PR fixes the Footer while keeping it unchanged in the Header through a prop. It also resolves a few instances of incorrect documentation.
A class name is to be added if the menu doesn’t wrap. Otherwise, consumers would need to add two classes to get the intended functionality. This introduces two variations in our CSS approach: the component adds a class if a prop is false, and theflex-wrap
property is set on the base class unless that class is present.