From cb8354d305c27507b9b9cc468004746d31881344 Mon Sep 17 00:00:00 2001 From: Joe Winger Date: Sat, 2 Nov 2024 11:44:02 -0400 Subject: [PATCH] fix: implement loader class from config (#489) --- src/assets.tsx | 4 ++-- src/index.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/assets.tsx b/src/assets.tsx index eccf6b0..e2fed7b 100644 --- a/src/assets.tsx +++ b/src/assets.tsx @@ -23,9 +23,9 @@ export const getAsset = (type: ToastTypes): JSX.Element | null => { const bars = Array(12).fill(0); -export const Loader = ({ visible }: { visible: boolean }) => { +export const Loader = ({ visible, className }: { visible: boolean, className?: string }) => { return ( -
+
{bars.map((_, i) => (
diff --git a/src/index.tsx b/src/index.tsx index 7a01870..c7a4859 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -233,7 +233,7 @@ const Toast = (props: ToastProps) => { function getLoadingIcon() { if (icons?.loading) { return ( -
+
{icons.loading}
); @@ -241,12 +241,12 @@ const Toast = (props: ToastProps) => { if (loadingIconProp) { return ( -
+
{loadingIconProp}
); } - return ; + return ; } return (