Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Button): display variant only when set #5458

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

davidjb
Copy link
Contributor

@davidjb davidjb commented Oct 1, 2020

This bugfix aligns the <button> variant class implementation with Alert/Badge/Navbar -- only outputing a prefix-variant formatted class when a variant is specified and avoiding the situation of outputting .btn-null or .btn- when the variant is null or an empty string respectively.

This adds several tests to confirm that the default variant gets removed but also the invalid variants don't get outputted.

Split from #5456

This bugfix aligns the `<button>` variant class implementation with
Alert/Badge/Navbar -- only outputing a `prefix-variant` formatted class
when a variant is specified and avoiding the situation of outputting
`.btn-null` or `.btn-` when the variant is null or an empty string
respectively

Split from react-bootstrap#5456
@jquense jquense merged commit f963ab3 into react-bootstrap:master Oct 1, 2020
@jquense
Copy link
Member

jquense commented Oct 1, 2020

thanks!

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.

None yet

2 participants