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

style(tooltip): replace selection unicode check with svg #2091

Merged
merged 2 commits into from
Jul 6, 2023
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 4 additions & 7 deletions packages/charts/src/components/tooltip/components/_tooltip.scss
nickofthyme marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ $transitionTime: 200ms;
min-width: 0;
}

&:not(&--bg)::before {
&--icon {
opacity: 1;
}
}
Expand Down Expand Up @@ -207,17 +207,14 @@ $transitionTime: 200ms;
}

&__colorStrip {
&::before {
&--icon {
opacity: 0;
content: '✓';
display: flex;
justify-content: center;
align-items: center;
height: 95%; // to center check
font-size: 130%;
font-weight: 200;
height: 100%; // to center check
transition: opacity $transitionTime;
padding: 0 $colorStripPadding;
padding: 0 4px;
}

&--spacer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ export function TooltipTableColorCell({
return (
<>
<div className="echTooltip__colorStrip--bg" style={{ backgroundColor }} />
<div className="echTooltip__colorStrip" style={{ backgroundColor: color, color: dotColor }} />
<div className="echTooltip__colorStrip" style={{ backgroundColor: color }}>
<div className="echTooltip__colorStrip--icon" style={{ fill: dotColor }}>
{/* Check svg to match eui - https://github.com/elastic/eui/blob/main/src/components/icon/svgs/check.svg?short_path=5a87b2e */}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path
fillRule="evenodd"
d="M6.50025,12.00025 C6.37225,12.00025 6.24425,11.95125 6.14625,11.85425 L2.14625,7.85425 C1.95125,7.65825 1.95125,7.34225 2.14625,7.14625 C2.34225,6.95125 2.65825,6.95125 2.85425,7.14625 L6.50025,10.79325 L13.14625,4.14625 C13.34225,3.95125 13.65825,3.95125 13.85425,4.14625 C14.04925,4.34225 14.04925,4.65825 13.85425,4.85425 L6.85425,11.85425 C6.75625,11.95125 6.62825,12.00025 6.50025,12.00025"
/>
</svg>
</div>
</div>
<div className="echTooltip__colorStrip--spacer" />
</>
);
Expand Down