You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2020/10/29 02:45:09 UTC
[incubator-superset] branch master updated: fix: Unwinds icon
fallout that came along with filters PR (#11474)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new e024267 fix: Unwinds icon fallout that came along with filters PR (#11474)
e024267 is described below
commit e024267447099f6f2f70c32063f642a4a9f3742c
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Wed Oct 28 19:44:39 2020 -0700
fix: Unwinds icon fallout that came along with filters PR (#11474)
* Unwinds icon revamp that came along with filters PR.
* cleanup/linting
* removing unused import
---
superset-frontend/src/components/Icon/index.tsx | 17 +----------------
.../src/dashboard/components/FiltersBadge/Styles.tsx | 10 +++++++++-
2 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/superset-frontend/src/components/Icon/index.tsx b/superset-frontend/src/components/Icon/index.tsx
index 2ba1aa2..d733751 100644
--- a/superset-frontend/src/components/Icon/index.tsx
+++ b/superset-frontend/src/components/Icon/index.tsx
@@ -17,7 +17,6 @@
* under the License.
*/
import React, { SVGProps } from 'react';
-import { styled } from '@superset-ui/core';
import { ReactComponent as AlertSolidIcon } from 'images/icons/alert_solid.svg';
import { ReactComponent as AlertIcon } from 'images/icons/alert.svg';
@@ -380,18 +379,6 @@ interface IconProps extends SVGProps<SVGSVGElement> {
name: IconName;
}
-const IconWrapper = styled.span`
- display: inline-block;
- width: 1em;
- height: 1em;
- svg {
- width: 100%;
- height: 100%;
- color: currentColor;
- vertical-align: middle;
- }
-`;
-
const Icon = ({
name,
color = '#666666',
@@ -401,9 +388,7 @@ const Icon = ({
const Component = iconsRegistry[name];
return (
- <IconWrapper>
- <Component color={color} viewBox={viewBox} data-test={name} {...rest} />
- </IconWrapper>
+ <Component color={color} viewBox={viewBox} data-test={name} {...rest} />
);
};
diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx
index ba6e358..4039fdc 100644
--- a/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx
+++ b/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx
@@ -20,8 +20,8 @@ import { styled } from '@superset-ui/core';
export const Pill = styled.div`
display: inline-block;
- background: ${({ theme }) => theme.colors.grayscale.base};
color: ${({ theme }) => theme.colors.grayscale.light5};
+ background: ${({ theme }) => theme.colors.grayscale.base};
border-radius: 1em;
vertical-align: text-top;
padding: ${({ theme }) => `${theme.gridUnit}px ${theme.gridUnit * 2}px`};
@@ -36,6 +36,11 @@ export const Pill = styled.div`
svg {
position: relative;
top: -1px;
+ color: ${({ theme }) => theme.colors.grayscale.light5};
+ width: 1em;
+ height: 1em;
+ display: inline-block;
+ vertical-align: middle;
}
&:hover {
@@ -49,6 +54,9 @@ export const Pill = styled.div`
&:hover {
background: ${({ theme }) => theme.colors.alert.dark1};
}
+ svg {
+ color: ${({ theme }) => theme.colors.grayscale.dark2};
+ }
}
&.filters-inactive {