You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/07/04 16:04:55 UTC

[GitHub] [superset] geido commented on a change in pull request #15528: refactor: icon to icons for nativeFilter components

geido commented on a change in pull request #15528:
URL: https://github.com/apache/superset/pull/15528#discussion_r663522682



##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTabs.tsx
##########
@@ -238,9 +237,7 @@ const FilterTabs: FC<FilterTabsProps> = ({
           </FilterTabTitle>
         }
         key={id}
-        closeIcon={
-          removedFilters[id] ? <></> : <StyledTrashIcon name="trash" />
-        }
+        closeIcon={removedFilters[id] ? <></> : <StyledTrashIcon />}

Review comment:
       Is the fragment needed here? Can we just default to `null`?

##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CascadeFilters/CascadePopover/index.tsx
##########
@@ -61,7 +61,13 @@ const StyledTitle = styled.h4`
   padding: 0;
 `;
 
-const StyledIcon = styled(Icon)`
+const StyledEditIcon = styled(Icons.Edit)`
+  margin-right: ${({ theme }) => theme.gridUnit}px;
+  color: ${({ theme }) => theme.colors.grayscale.dark1};
+  width: ${({ theme }) => theme.gridUnit * 4}px;
+`;

Review comment:
       I think for brevity you can do 
   
   ```suggestion
   const StyledEditIcon = styled(Icons.Edit)`
     ${({ theme }) => `
     margin-right: ${theme.gridUnit}px; 
     color: ${theme.colors.grayscale.dark1};
     width: ${theme.gridUnit * 4}px;
     `}
     `;
   ```




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org