diff --git a/.changeset/tender-doors-argue.md b/.changeset/tender-doors-argue.md new file mode 100644 index 00000000..e497f3cc --- /dev/null +++ b/.changeset/tender-doors-argue.md @@ -0,0 +1,5 @@ +--- +"@cube-dev/ui-kit": patch +--- + +Add element attribute for loading icon in the Button component to fix styling. diff --git a/src/components/actions/Button/Button.tsx b/src/components/actions/Button/Button.tsx index d274adc4..0bbe6e53 100644 --- a/src/components/actions/Button/Button.tsx +++ b/src/components/actions/Button/Button.tsx @@ -351,7 +351,13 @@ export const Button = forwardRef(function Button( data-size={size ?? 'medium'} styles={styles} > - {icon || isLoading ? !isLoading ? icon : : null} + {icon || isLoading ? ( + !isLoading ? ( + icon + ) : ( + + ) + ) : null} {children} {rightIcon}