This repository was archived by the owner on Jul 31, 2026. It is now read-only.
fix(Button): fixes behavior of asChild in BrandButton - #325
Merged
Conversation
Collaborator
Author
|
Oh hang on. This is not good typescript |
adaam2
approved these changes
Dec 19, 2025
mouse moves trigger render cycles in BrandButtons. When this component reference is unstable breaks click events unpredictably
qstearns
force-pushed
the
quinn/fix-brand-button-as-child
branch
from
December 19, 2025 18:24
d4773e3 to
b9b4191
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
mouse moves trigger render cycles in BrandButtons.
when this component reference is unstable it breaks click events unpredictably
Note
Extracts a top-level BrandSlot and passes isBrandVariant when asChild is used to correctly inject brand background without unstable re-renders.
src/components/Button/index.tsx):BrandSlotto a top-level component and reuse it whenasChildis true.isBrandVarianttoBrandSlotand setComptoBrandSlotwhenasChildto inject the brand background correctly.asChildpath; child processing unchanged except bypassed whenasChild.Written by Cursor Bugbot for commit b9b4191. This will update automatically on new commits. Configure here.