Move conditional rendering logic for the share button to remove styling#16177
Open
dskamiotis wants to merge 1 commit into
Open
Move conditional rendering logic for the share button to remove styling#16177dskamiotis wants to merge 1 commit into
share button to remove styling#16177dskamiotis wants to merge 1 commit into
Conversation
…top padding when it doesn't render
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
share button to remove styling
cemms1
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 does this change?
Moves the share-button conditional rendering logic outside the parent container so the container is not rendered when the share button is omitted.
This prevents the unused top padding from being applied when no share button is shown.
Why?
A related PR introduced conditional rendering for the share button: #16139
In the current implementation, when the share button is not rendered, the parent container still renders and applies padding-top, leaving unnecessary spacing.
This is a small cleanup that avoids that layout side effect.