diff --git a/.changeset/common-coins-stare.md b/.changeset/common-coins-stare.md new file mode 100644 index 0000000000..0bd0078cf9 --- /dev/null +++ b/.changeset/common-coins-stare.md @@ -0,0 +1,7 @@ +--- +'@backstage/ui': patch +--- + +Fixed `ButtonIcon` incorrectly applying `className` to inner elements instead of only the root element. + +Affected components: ButtonIcon diff --git a/.patches/pr-31900.txt b/.patches/pr-31900.txt new file mode 100644 index 0000000000..43616d0e98 --- /dev/null +++ b/.patches/pr-31900.txt @@ -0,0 +1 @@ +Fix incorrectly applying className to three elements internally in ButtonIcon. \ No newline at end of file diff --git a/packages/ui/src/components/ButtonIcon/ButtonIcon.tsx b/packages/ui/src/components/ButtonIcon/ButtonIcon.tsx index d3596da799..9bbeca9d5b 100644 --- a/packages/ui/src/components/ButtonIcon/ButtonIcon.tsx +++ b/packages/ui/src/components/ButtonIcon/ButtonIcon.tsx @@ -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, )} >