Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove gradient background from tooltips #230

Merged
merged 2 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/components/tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,8 @@ const TooltipWrapper = styled.div`
margin-left: ${ifPlacementEquals('right', ArrowSpacing + 2)}px;
margin-right: ${ifPlacementEquals('left', ArrowSpacing + 2)}px;

background-image: linear-gradient(
-1deg,
rgba(248, 248, 248, 0.97) 0%,
rgba(255, 255, 255, 0.97) 100%
);
background: rgba(255, 255, 255, 0.97);

filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.05)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
border-radius: ${spacing.borderRadius.small}px;
font-size: ${typography.size.s1}px;
Expand Down
9 changes: 7 additions & 2 deletions src/components/tooltip/Tooltip.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@ import styled from 'styled-components';
import { Tooltip } from './Tooltip';

// Popper would position the tooltip absolutely. We just need to make sure we are pos:rel
const mockPopperProps = { style: { position: 'relative', top: '20px', left: '20px' } };
const mockPopperProps = { style: { position: 'relative', top: '0px', left: '0px' } };

const Content = styled.div`
width: 100px;
height: 100px;
font-size: 16px;
text-align: center;
line-height: 100px;
background: #eee;
outline: 1px dotted red;
`;

export default {
title: 'tooltip/Tooltip',
component: Tooltip,
decorators: [
(storyFn) => (
<div style={{ padding: '1em', background: '#eee', display: 'inline-block' }}>{storyFn()}</div>
),
],
};

export const basicDefault = () => (
Expand Down