Closed SiravitPhokeed closed 1 year ago
As part of the 3.0 revamp, most of this feedback has been implemented with minor changes, the most major of which is how Icon is implemented. As is standard in other component libraries, an icon can be added to Button via the icon
prop. I guess congratulations are in order for…past me…?
Is your feature request related to a problem? Please describe. Whoever wrote the Button component is clearly drunk.
name
is for the description that is only visible to screenreaders (and not even the tooltip!), andlabel
is for the text inside the Button. To put stuff inside the Button you have to write attributes, not children?Describe the solution you’d like Consider this:
Doesn’t that make more sense? Button should adapt automatically based on what elements are present inside
children
as well, eliminating the need foriconOnly
.Additional context There are some changes that must be made in SKCom for this to work. Instead of changing modifiers based on whether Icon or text are present, we detect those elements directly in the CSS. This will make it easier to use Button for SKCom users as well.