Skip to content

Commit

Permalink
Dry up drop indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
rtexelm committed Aug 5, 2024
1 parent ff0ecac commit edce75f
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,30 +114,21 @@ const StyledCancelXIcon = styled(Icons.CancelX)`
color: ${({ theme }) => theme.colors.grayscale.base};
`;

const RightDropIndicator = styled.div`
const DropIndicator = styled.div`
border: 2px solid ${({ theme }) => theme.colors.primary.base};
width: 5px;
height: 100%;
position: absolute;
top: 0;
right: -4px;
border-radius: 2px;
`;
const LeftDropIndicator = styled.div`
border: 2px solid ${({ theme }) => theme.colors.primary.base};
width: 5px;
height: 100%;
position: absolute;
top: 0;
left: -4px;
${({ pos }) => (pos === 'left' ? 'left: -4px' : 'right: -4px')};
border-radius: 2px;
`;

const CloseIconWithDropIndicator = props => (
<>
<StyledCancelXIcon />
{props.showDropIndicators.right && (
<RightDropIndicator className="drop-indicator-right" />
<DropIndicator className="drop-indicator-right" pos="right" />
)}
</>
);
Expand Down Expand Up @@ -449,7 +440,10 @@ export class Tabs extends PureComponent {
) : (
<>
{showDropIndicators(tabIndex).left && (
<LeftDropIndicator className="drop-indicator-left" />
<DropIndicator
className="drop-indicator-left"
pos="left"
/>
)}
<DashboardComponent
id={tabId}
Expand Down

0 comments on commit edce75f

Please sign in to comment.