chore: Moves Fade component into TableElement (#13458)

This commit is contained in:
Michael S. Molina
2021-04-08 16:56:21 -03:00
committed by GitHub
parent b5e5b3aa62
commit 784d29b57c
3 changed files with 12 additions and 32 deletions

View File

@@ -25,7 +25,6 @@ import shortid from 'shortid';
import { t, styled } from '@superset-ui/core';
import { debounce } from 'lodash';
import Fade from 'src/common/components/Fade';
import { Tooltip } from 'src/common/components/Tooltip';
import CopyToClipboard from '../../components/CopyToClipboard';
import { IconTooltip } from '../../components/IconTooltip';
@@ -52,6 +51,11 @@ const StyledSpan = styled.span`
cursor: pointer;
`;
const Fade = styled.div`
transition: all ${({ theme }) => theme.transitionTiming}s;
opacity: ${props => (props.hovered ? 1 : 0)};
`;
class TableElement extends React.PureComponent {
constructor(props) {
super(props);
@@ -215,6 +219,7 @@ class TableElement extends React.PureComponent {
<Loading position="inline" />
) : (
<Fade
data-test="fade"
hovered={this.state.hovered}
onClick={e => e.stopPropagation()}
>