michael-s-molina commented on a change in pull request #15579:
URL: https://github.com/apache/superset/pull/15579#discussion_r667080797



##########
File path: superset-frontend/src/messageToasts/components/Toast.tsx
##########
@@ -76,16 +77,17 @@ export default function Toast({ toast, onCloseToast }: 
ToastPresenterProps) {
     };
   }, [handleClosePress, toast.duration]);
 
-  let iconName: IconName = 'circle-check-solid';
   let className = 'toast--success';
+  let icon = <Icons.CircleCheckSolid css={theme => StyledIcon(theme)} />;
+
   if (toast.toastType === ToastType.WARNING) {
-    iconName = 'warning-solid';
+    icon = <Icons.WarningSolid css={StyledIcon} />;
     className = 'toast--warning';
   } else if (toast.toastType === ToastType.DANGER) {
-    iconName = 'error-solid';
+    icon = <Icons.ErrorSolid css={theme => StyledIcon(theme)} />;

Review comment:
       ```suggestion
       icon = <Icons.ErrorSolid css={StyledIcon} />;
   ```

##########
File path: superset-frontend/src/messageToasts/components/Toast.tsx
##########
@@ -76,16 +77,17 @@ export default function Toast({ toast, onCloseToast }: 
ToastPresenterProps) {
     };
   }, [handleClosePress, toast.duration]);
 
-  let iconName: IconName = 'circle-check-solid';
   let className = 'toast--success';
+  let icon = <Icons.CircleCheckSolid css={theme => StyledIcon(theme)} />;
+
   if (toast.toastType === ToastType.WARNING) {
-    iconName = 'warning-solid';
+    icon = <Icons.WarningSolid css={StyledIcon} />;
     className = 'toast--warning';
   } else if (toast.toastType === ToastType.DANGER) {
-    iconName = 'error-solid';
+    icon = <Icons.ErrorSolid css={theme => StyledIcon(theme)} />;
     className = 'toast--danger';
   } else if (toast.toastType === ToastType.INFO) {
-    iconName = 'info-solid';
+    icon = <Icons.InfoSolid css={theme => StyledIcon(theme)} />;

Review comment:
       ```suggestion
       icon = <Icons.InfoSolid css={StyledIcon} />;
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to