carbon icon indicating copy to clipboard operation
carbon copied to clipboard

fix(button): update types hasIconOnly & kind !== danger

Open ariellalgilmore opened this issue 1 year ago • 4 comments

Closes #17036

[warnings visible when setting the wrong kind] Screenshot 2024-08-26 at 10 55 22 AM

Changelog

Changed

  • update ButtonBaseProps kind to equal hasIconOnly ? iconButtonKind : buttonKind
  • and updated Button.propTypes similarily to above^

Testing / Reviewing

  • Go to storybook button confirm no warning errors
  • go to storybook button -> icon button and change the kind to "danger" and see warnings

ariellalgilmore avatar Aug 26 '24 17:08 ariellalgilmore

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
Latest commit 860da925db10427ee696e74a96be7b977dae75c9
Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66ccc225dcd9550008f00cea
Deploy Preview https://deploy-preview-17272--v11-carbon-react.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.

netlify[bot] avatar Aug 26 '24 18:08 netlify[bot]

Deploy Preview for carbon-elements ready!

Name Link
Latest commit 860da925db10427ee696e74a96be7b977dae75c9
Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66ccc22594535400083bb802
Deploy Preview https://deploy-preview-17272--carbon-elements.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.

netlify[bot] avatar Aug 26 '24 18:08 netlify[bot]

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
Latest commit 02e9df4b6073ccbb87f90e3017058964bf028a77
Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66e1dccf56db530008d62d16
Deploy Preview https://deploy-preview-17272--v11-carbon-react.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.

netlify[bot] avatar Aug 26 '24 18:08 netlify[bot]

Deploy Preview for carbon-elements ready!

Name Link
Latest commit 02e9df4b6073ccbb87f90e3017058964bf028a77
Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66e1dccf2c579b0008a39d85
Deploy Preview https://deploy-preview-17272--carbon-elements.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.

netlify[bot] avatar Aug 26 '24 18:08 netlify[bot]

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.82%. Comparing base (b3bba86) to head (02e9df4).

Files with missing lines Patch % Lines
packages/react/src/components/Button/Button.tsx 87.50% 1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17272   +/-   ##
=======================================
  Coverage   76.82%   76.82%           
=======================================
  Files         408      408           
  Lines       13958    13966    +8     
  Branches     4333     4336    +3     
=======================================
+ Hits        10723    10730    +7     
  Misses       3062     3062           
- Partials      173      174    +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 11 '24 17:09 codecov[bot]

Hey there! v11.66.0 was just released that references this issue/PR.

carbon-automation[bot] avatar Sep 13 '24 16:09 carbon-automation[bot]