react
react copied to clipboard
Button content grid cells are equal
Describe the bug
With version 35.x, Buttons have a new content grid, containing spots for leading and trailing icons along with the content of the button. The issue is that the columns are all 1fr by default, giving much more space to the icon cells than they need whilst compressing the content cell.
To Reproduce Steps to reproduce the behavior:
- Create a button with leading and/or trailing icons, along with content
- See error
Expected behavior
Grid cells should be gridTemplateColumns: "min-content 1fr min-content"

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.
Hey @dusave, I'm so sorry we didn't get back to you on this much sooner! Apologies 🙏🏻
Are you able to confirm this is still a problem?
Update, @langermank is working on resolving this right now 🎉
Noting that the linked PR includes breaking changes, so we'd schedule them to go out with the next major release.
@joshblack noted there may be some changes we could pull out of this PR to release as non-breaking. cc @langermank
Addressed here https://github.com/primer/react/pull/2792