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

Remove button variant class when no variant set #3372

Merged
merged 2 commits into from
Sep 27, 2024
Merged

Conversation

rmccar
Copy link
Contributor

@rmccar rmccar commented Sep 26, 2024

What is the context of this PR?

Fixes: #3371

The variant button class is being added to the button whether a variant is set or not because of the way the logic around adding the class is written. This PR fixes the logic.

How to review this PR

  • Test an example with a button in like the access code one and check that the class isn't on the button
  • Test adding a variant to the button, using both a string and multiple with an array and see that the classes are added

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

@rmccar rmccar added the Bug Something isn't working label Sep 26, 2024
@rmccar rmccar self-assigned this Sep 26, 2024
Copy link

netlify bot commented Sep 26, 2024

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit 1aff377
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/66f67bba547b0700086a4fe4
😎 Deploy Preview https://deploy-preview-3372--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rmccar rmccar merged commit 0b669c7 into main Sep 27, 2024
42 checks passed
@rmccar rmccar deleted the fix-button-variant-class branch September 27, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Button being rendered with incomplete variant class
3 participants