Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
ddaec8db
Unverified
Commit
ddaec8db
authored
Jan 09, 2019
by
Torkel Ödegaard
Committed by
GitHub
Jan 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14796 from grafana/14271-tooltip-themes
feat: Tooltip theme and use it on panel edit tabs
parents
13a962cc
d8a91fa3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
5 deletions
+19
-5
packages/grafana-ui/src/components/Tooltip/Popper.tsx
+1
-0
packages/grafana-ui/src/components/Tooltip/_Tooltip.scss
+14
-4
public/app/features/dashboard/dashgrid/PanelEditor.tsx
+2
-1
public/sass/_variables.dark.scss
+1
-0
public/sass/_variables.light.scss
+1
-0
No files found.
packages/grafana-ui/src/components/Tooltip/Popper.tsx
View file @
ddaec8db
...
...
@@ -7,6 +7,7 @@ import Transition from 'react-transition-group/Transition';
export
enum
Themes
{
Default
=
'popper__background--default'
,
Error
=
'popper__background--error'
,
Brand
=
'popper__background--brand'
,
}
const
defaultTransitionStyles
=
{
...
...
packages/grafana-ui/src/components/Tooltip/_Tooltip.scss
View file @
ddaec8db
$popper-margin-from-ref
:
5px
;
@mixin
popper-theme
(
$backgroundColor
,
$arrowColor
)
{
background
:
$backgroundColor
;
.popper__arrow
{
border-color
:
$arrowColor
;
}
}
.popper
{
position
:
absolute
;
z-index
:
$zindex-tooltip
;
...
...
@@ -16,10 +24,12 @@ $popper-margin-from-ref: 5px;
// Themes
&
.popper__background--error
{
background
:
$tooltipBackgroundError
;
.popper__arrow
{
border-color
:
$tooltipBackgroundError
;
}
@include
popper-theme
(
$tooltipBackgroundError
,
$tooltipBackgroundError
);
}
&
.popper__background--brand
{
@include
popper-theme
(
$tooltipBackgroundBrand
,
$tooltipBackgroundBrand
);
@include
gradient-vertical
(
$red
,
$orange
);
}
}
...
...
public/app/features/dashboard/dashgrid/PanelEditor.tsx
View file @
ddaec8db
...
...
@@ -16,6 +16,7 @@ import { DashboardModel } from '../dashboard_model';
import
{
PanelPlugin
}
from
'app/types/plugins'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
{
Themes
}
from
'@grafana/ui/src/components/Tooltip/Popper'
;
interface
PanelEditorProps
{
panel
:
PanelModel
;
...
...
@@ -138,7 +139,7 @@ function TabItem({ tab, activeTab, onClick }: TabItemParams) {
return
(
<
div
className=
"panel-editor-tabs__item"
onClick=
{
()
=>
onClick
(
tab
)
}
>
<
a
className=
{
tabClasses
}
>
<
Tooltip
content=
{
`${tab.text}`
}
placement=
"auto"
>
<
Tooltip
content=
{
`${tab.text}`
}
placement=
"auto"
theme=
{
Themes
.
Brand
}
>
<
i
className=
{
`gicon gicon-${tab.id}${activeTab === tab.id ? '-active' : ''}`
}
/>
</
Tooltip
>
</
a
>
...
...
public/sass/_variables.dark.scss
View file @
ddaec8db
...
...
@@ -310,6 +310,7 @@ $graph-tooltip-bg: $dark-1;
$tooltipBackground
:
$popover-help-bg
;
$tooltipArrowColor
:
$tooltipBackground
;
$tooltipBackgroundError
:
$brand-danger
;
$tooltipBackgroundBrand
:
$brand-primary
;
// images
$checkboxImageUrl
:
'../img/checkbox.png'
;
...
...
public/sass/_variables.light.scss
View file @
ddaec8db
...
...
@@ -314,6 +314,7 @@ $graph-tooltip-bg: $gray-5;
$tooltipBackground
:
$popover-help-bg
;
$tooltipArrowColor
:
$tooltipBackground
;
// Used by Angular tooltip
$tooltipBackgroundError
:
$brand-danger
;
$tooltipBackgroundBrand
:
$brand-primary
;
// images
$checkboxImageUrl
:
'../img/checkbox_white.png'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment