diff --git a/src/buttons/DownloadButton/DownloadButton.tsx b/src/buttons/DownloadButton/DownloadButton.tsx
index 653d6e5cc..056f91aa8 100644
--- a/src/buttons/DownloadButton/DownloadButton.tsx
+++ b/src/buttons/DownloadButton/DownloadButton.tsx
@@ -11,17 +11,17 @@ import {
import { MouseEventHandler } from 'react';
-import { DEFAULT_LOADER_SIZE } from '@/constants.js';
import {
ActionButton,
ActionButtonVariant,
- ColorVariants,
ColorVariantsType,
TooltipPlacement,
} from '@/types.js';
import { useButtonColor } from '../hooks.js';
+export const DEFAULT_LOADER_SIZE = 24;
+
export type DownloadButtonProps = {
ariaLabel: string;
/**
@@ -36,7 +36,7 @@ export type DownloadButtonProps = {
/**
* CircularProgress's size
*/
- loaderSize: number;
+ loaderSize?: number;
/**
* Tooltip's title
*/
@@ -52,7 +52,7 @@ const DownloadButton = ({
ariaLabel = 'download',
handleDownload,
isLoading = false,
- color = ColorVariants.Primary,
+ color,
loaderSize = DEFAULT_LOADER_SIZE,
title = 'Download',
placement = 'bottom',
@@ -74,18 +74,20 @@ const DownloadButton = ({
);
case ActionButton.ICON_BUTTON:
default:
- if (isLoading) {
- return ;
- }
return (
- {icon}
+ {isLoading ? (
+
+ ) : (
+ icon
+ )}
diff --git a/src/constants.ts b/src/constants.ts
index 5d99505d2..898c63a0a 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -6,7 +6,6 @@ export const DRAWER_HEADER_HEIGHT = 55;
export const DEFAULT_THUMBNAIL_SIZE = ThumbnailSize.Small;
export const DEFAULT_LINK_SHOW_BUTTON = true;
-export const DEFAULT_LOADER_SIZE = 20;
export const UNEXPECTED_ERROR_MESSAGE = 'An unexpected error occurred';
export const SMALL_AVATAR_SIZE = 40;