chanzuckerberg / sci-components

2021 Science Design System Component Library
https://chanzuckerberg.github.io/sci-components/
MIT License
25 stars 7 forks source link

fix(ButtonIcon): add sdsStyle to doNotForwardProps #847

Closed crispipear closed 2 months ago

crispipear commented 2 months ago

Summary

Structural Element (Base, Gene, DNA, Chromosome or Cell) Genes? Github issue: N/A

Background

When using an icon styled ButtonDropdown, there will be a console error message about prop sdsStyle being passed in the DOM.

<ButtonDropdown /> renders <ButtonIcon /> when sdsStyle="icon". While <ButtonIcon /> doesn't do more with the sdsStyle prop beyond that point, all the props (along with sdsStyle) are still being passed into the underlying components. There will still be a console error since "sdsStyle" wasn't included in the list of doNotForwardProps.

Checklist

masoudmanson commented 2 months ago

Hey @crispipear, this is awesome! 🤩😍😯

Thanks a ton for jumping in and contributing to SDS! Really appreciate you taking the time to help out. Looking forward to seeing more from you! 🥳🎉

masoudmanson commented 2 months ago

I’ll go ahead and merge this into the main branch now. It should be included in the next release cycle, likely this Wednesday. 🥳🎉

masoudmanson commented 2 months ago

09/18 Release

:computer: Coded Library (@czi-sds/components@21.2.0)

:gift: New Features:

:bug: Bug Fixes