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



##########
File path: superset-frontend/src/views/CRUD/data/query/QueryList.tsx
##########
@@ -80,17 +86,16 @@ const StyledPopoverItem = styled.div`
   color: ${({ theme }) => theme.colors.grayscale.dark2};
 `;
 
-const StatusIcon = styled(Icon, {
-  shouldForwardProp: prop => prop !== 'status',
-})<{ status: string }>`
-  color: ${({ status, theme }) => {
-    if (status === 'success') return theme.colors.success.base;
-    if (status === 'failed') return theme.colors.error.base;
-    if (status === 'running') return theme.colors.primary.base;
-    if (status === 'offline') return theme.colors.grayscale.light1;
+const getColor = (theme: SupersetTheme, status: string) => {
+  if (status === 'success') return theme.colors.success.base;
+  if (status === 'failed') return theme.colors.error.base;
+  if (status === 'running') return theme.colors.primary.base;
+  if (status === 'offline') return theme.colors.grayscale.light1;
+  return theme.colors.grayscale.base;
+};
 
-    return theme.colors.grayscale.base;
-  }};
+const StatusIcon = (theme: SupersetTheme, status: string) => css`

Review comment:
       I think the best approach here is to use the `iconColor` prop directly.
   
   `<Icons.Check iconColor={theme.colors.primary.base} />`
   
   With that, you can delete `getColor` and `StatusIcon`.




-- 
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