-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: update icon button types and docs #18658
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18658 +/- ##
=======================================
Coverage 84.97% 84.97%
=======================================
Files 408 408
Lines 14542 14543 +1
Branches 4714 4765 +51
=======================================
+ Hits 12357 12358 +1
+ Misses 2024 2023 -1
- Partials 161 162 +1 ☔ View full report in Codecov by Sentry. |
@adamalston Thanks for this contribution! Yes, what you referenced would need to be changed as well. There's an open epic for React/web-component parity, i.e. updating web components to mirror React. Web components weren't part of the monorepo when older issues like the one you're addressing were created, so the fix was targeted for React only. So I think only addressing #17956 is fine. |
Closes #17956
Updated
IconButton
types and documentation.Changelog
Changed
IconButton
types and documentation.Button
tests.Testing / Reviewing
My understanding of the
Button
tests was that there was a bug in them. The test titles say 'should set the expected classes for the button of :%s
'. Doesn't that mean if the prop is set on theButton
that the code would apply the right class to it? If so, I'm not sure how these tests were ever going to fail considering theclassName
s were explictly set in them.yarn test packages/react/src/components/Button packages/react/src/components/IconButton
If the changes in this pull request are correct and the
IconButton
is supposed to belg
by default, does the following code need to be changed too?carbon/packages/web-components/src/components/icon-button/icon-button.ts
Lines 64 to 68 in a60a4d3