Tooltips : Add ability to flag anchor tag as external link in a tooltip (#41014)

* sass: add in the option for extneral link color to tooltip anchor tag

* variable editor: change the link in the tool tip to external styling

* fixed class name to be the same as other instances of this
This commit is contained in:
Tim Levett 2021-11-01 09:14:53 -05:00 committed by GitHub
parent 993c60d36e
commit a81ca03302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 1 deletions

View File

@ -19,9 +19,12 @@ $popper-margin-from-ref: 5px;
color: lighten($textColor, 20%);
}
a {
color: $white;
color: $tooltipLinkColor;
text-decoration: underline;
}
a.external-link {
color: $tooltipExternalLinkColor;
}
}
.popper {

View File

@ -282,6 +282,7 @@ $alert-info-bg: ${theme.colors.warning.main};
// -------------------------
$tooltipArrowWidth: 5px;
$tooltipLinkColor: $link-color;
$tooltipExternalLinkColor: $external-link-color;
$graph-tooltip-bg: $dark-1;
$tooltipBackground: ${theme.components.tooltip.background};

View File

@ -293,6 +293,7 @@ $graph-tooltip-bg: $gray-5;
$tooltipArrowWidth: 5px;
$tooltipLinkColor: lighten($tooltipColor, 5%);
$tooltipExternalLinkColor: #6E9FFF;
$popover-error-bg: $btn-danger-bg;
$popover-help-bg: $tooltipBackground;

View File

@ -190,6 +190,7 @@ export class QueryVariableEditorUnConnected extends PureComponent<Props, State>
Optional, if you want to extract part of a series name or metric node segment. Named capture groups
can be used to separate the display text and value (
<a
className="external-link"
href="https://grafana.com/docs/grafana/latest/variables/filter-variables-with-regex#filter-and-modify-using-named-text-and-value-capture-groups"
target="__blank"
>

View File

@ -285,6 +285,7 @@ $alert-info-bg: #F5B73D;
// -------------------------
$tooltipArrowWidth: 5px;
$tooltipLinkColor: $link-color;
$tooltipExternalLinkColor: $external-link-color;
$graph-tooltip-bg: $dark-1;
$tooltipBackground: #22252b;

View File

@ -295,6 +295,7 @@ $graph-tooltip-bg: $gray-5;
$tooltipArrowWidth: 5px;
$tooltipLinkColor: lighten($tooltipColor, 5%);
$tooltipExternalLinkColor: #6E9FFF;
$popover-error-bg: $btn-danger-bg;
$popover-help-bg: $tooltipBackground;

View File

@ -111,6 +111,10 @@
a {
color: $tooltipLinkColor;
}
a.external-link {
color: $tooltipExternalLinkColor;
}
}
.grafana-tip {