Skip to content

Conversation

jrd-lewis
Copy link
Contributor

This PR will fix where the CButton defaults to 'btn-undefined' when the variant is not declared.

Example, pre-PR with no declared variant attribute on a CButton component:

image

New Behavior:

  • If the variant attribute is undeclared, it will not add 'btn-undefined' like it had been doing.
  • If both the color and variant attributes are declared, it will 'btn-{variant}-{color}' like it currently does.
  • If the color attribute is undeclared and the variant attribute is declared, it will 'btn-{variant}' like it currently does.

@mrholek mrholek merged commit d53b6fe into coreui:main Jul 31, 2025
@mrholek
Copy link
Member

mrholek commented Jul 31, 2025

@jrd-lewis, thank you for your help!

@jrd-lewis jrd-lewis deleted the feature/cbutton-variant-fix branch August 1, 2025 02:00
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.

2 participants