fix(ui): apply className only to root element in ButtonIcon
Remove duplicate className application from inner elements (content and spinner). The className prop should only be applied to the root button element, matching the behavior of the Button component. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/ui': patch
|
||||
---
|
||||
|
||||
Fixed `ButtonIcon` incorrectly applying `className` to inner elements instead of only the root element.
|
||||
|
||||
Affected components: ButtonIcon
|
||||
@@ -0,0 +1 @@
|
||||
Fix incorrectly applying className to three elements internally in ButtonIcon.
|
||||
@@ -64,7 +64,6 @@ export const ButtonIcon = forwardRef(
|
||||
classNamesButtonIcon.content,
|
||||
stylesButton[classNames.content],
|
||||
stylesButtonIcon[classNamesButtonIcon.content],
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{icon}
|
||||
@@ -79,7 +78,6 @@ export const ButtonIcon = forwardRef(
|
||||
classNamesButtonIcon.spinner,
|
||||
stylesButton[classNames.spinner],
|
||||
stylesButtonIcon[classNamesButtonIcon.spinner],
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<RiLoader4Line aria-hidden="true" />
|
||||
|
||||
Reference in New Issue
Block a user