Skip to content

Fix Toast right padding when closeButton is false with an action button - #257

Open
tristen wants to merge 2 commits into
mainfrom
fix-toast-action-padding
Open

Fix Toast right padding when closeButton is false with an action button#257
tristen wants to merge 2 commits into
mainfrom
fix-toast-action-padding

Conversation

@tristen

@tristen tristen commented Aug 7, 2026

Copy link
Copy Markdown
Member

When a Toast is rendered with closeButton={false} and an action button, an unwanted gap appears to the right of the action button. This fixes that

The pr12 compensation for a missing close button was applied whenever
closeButton was false, ignoring whether an action button was present.
With an action button and no close button, this added surplus padding to
the right of the action. Only apply the compensation when neither a close
button nor an action button is rendered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tristen
tristen requested a review from a team as a code owner August 7, 2026 18:31
@tristen
tristen requested a review from miafan23 August 7, 2026 18:33
Replace parentElement/querySelector access with a data-testid on the
button-group span so the tests query through Testing Library.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant