1
- import { GrafanaTheme } from '@grafana/data' ;
1
+ import { GrafanaTheme2 } from '@grafana/data' ;
2
2
import { css } from '@emotion/css' ;
3
3
4
- export const getStyles = ( ( theme : GrafanaTheme ) => {
4
+ export const getStyles = ( ( theme : GrafanaTheme2 ) => {
5
5
const containerBorder = theme . isDark
6
- ? theme . palette . dark9
7
- : theme . palette . gray5 ;
6
+ ? theme . v1 . palette . dark9
7
+ : theme . v1 . palette . gray5 ;
8
8
9
9
return {
10
10
container : css `
11
11
top : -1px ;
12
12
position : absolute;
13
13
right : 544px ;
14
- box-shadow : 0px 0px 20px ${ theme . colors . dropdownShadow } ;
15
- background-color : ${ theme . colors . bodyBg } ;
14
+ box-shadow : 0px 0px 20px ${ theme . v1 . colors . dropdownShadow } ;
15
+ background-color : ${ theme . v1 . colors . bodyBg } ;
16
16
z-index : -1 ;
17
17
border : 1px solid ${ containerBorder } ;
18
18
border-radius : 2px 0 0 2px ;
19
19
20
20
& : after {
21
21
display : block;
22
- background-color : ${ theme . colors . bodyBg } ;
22
+ background-color : ${ theme . v1 . colors . bodyBg } ;
23
23
width : 19px ;
24
24
height : 100% ;
25
25
content : '' ;
26
26
position : absolute;
27
27
top : 0 ;
28
28
right : -19px ;
29
- border-left : 1px solid ${ theme . colors . border1 } ;
29
+ border-left : 1px solid ${ theme . v1 . colors . border1 } ;
30
30
}
31
31
` ,
32
32
modal : css `
33
- z-index : ${ theme . zIndex . modal } ;
33
+ z-index : ${ theme . v1 . zIndex . modal } ;
34
34
` ,
35
35
content : css `
36
36
margin : 0 auto;
@@ -44,22 +44,22 @@ export const getStyles = ((theme: GrafanaTheme) => {
44
44
left : 0 ;
45
45
background : # 202226 ;
46
46
opacity : 0.7 ;
47
- z-index : ${ theme . zIndex . modalBackdrop } ;
47
+ z-index : ${ theme . v1 . zIndex . modalBackdrop } ;
48
48
text-align : center;
49
49
` ,
50
50
} ;
51
51
} ) ;
52
52
53
- export const getBodyStyles = ( ( theme : GrafanaTheme ) => {
53
+ export const getBodyStyles = ( ( theme : GrafanaTheme2 ) => {
54
54
const containerBorder = theme . isDark
55
- ? theme . palette . dark9
56
- : theme . palette . gray5 ;
55
+ ? theme . v1 . palette . dark9
56
+ : theme . v1 . palette . gray5 ;
57
57
58
58
return {
59
59
title : css `
60
60
color : ${ theme . colors . text } ;
61
- background-color : ${ theme . colors . bodyBg } ;
62
- font-size : ${ theme . typography . size . md } ;
61
+ background-color : ${ theme . v1 . colors . bodyBg } ;
62
+ font-size : ${ theme . v1 . typography . size . md } ;
63
63
border : 1px solid transparent;
64
64
65
65
& : hover {
@@ -69,10 +69,10 @@ export const getBodyStyles = ((theme: GrafanaTheme) => {
69
69
body : css `
70
70
z-index : ${ theme . zIndex . modal } ;
71
71
position : fixed;
72
- background-color : ${ theme . colors . bodyBg } ;
72
+ background-color : ${ theme . v1 . colors . bodyBg } ;
73
73
width : 268px ;
74
74
75
- box-shadow : 0px 0px 20px ${ theme . colors . dropdownShadow } ;
75
+ box-shadow : 0px 0px 20px ${ theme . v1 . colors . dropdownShadow } ;
76
76
border : 1px solid ${ containerBorder } ;
77
77
border-radius : 2px 0 0 2px ;
78
78
@@ -83,13 +83,13 @@ export const getBodyStyles = ((theme: GrafanaTheme) => {
83
83
background-color : inherit;
84
84
color : ${ theme . colors . text } ;
85
85
border : 0 ;
86
- font-weight : ${ theme . typography . weight . semibold } ;
86
+ font-weight : ${ theme . v1 . typography . weight . semibold } ;
87
87
}
88
88
89
89
.react-calendar__month-view__weekdays {
90
90
background-color : inherit;
91
91
text-align : center;
92
- color : ${ theme . palette . blue77 } ;
92
+ color : ${ theme . v1 . palette . blue77 } ;
93
93
94
94
abbr {
95
95
border : 0 ;
@@ -119,9 +119,9 @@ export const getBodyStyles = ((theme: GrafanaTheme) => {
119
119
120
120
.react-calendar__tile--active ,
121
121
.react-calendar__tile--active : hover {
122
- color : ${ theme . palette . white } ;
123
- font-weight : ${ theme . typography . weight . semibold } ;
124
- background : ${ theme . palette . blue95 } ;
122
+ color : ${ theme . v1 . palette . white } ;
123
+ font-weight : ${ theme . v1 . typography . weight . semibold } ;
124
+ background : ${ theme . v1 . palette . blue95 } ;
125
125
box-shadow : none;
126
126
border : 0px ;
127
127
}
@@ -130,12 +130,12 @@ export const getBodyStyles = ((theme: GrafanaTheme) => {
130
130
.react-calendar__tile--rangeStart {
131
131
padding : 0 ;
132
132
border : 0px ;
133
- color : ${ theme . palette . white } ;
134
- font-weight : ${ theme . typography . weight . semibold } ;
135
- background : ${ theme . palette . blue95 } ;
133
+ color : ${ theme . v1 . palette . white } ;
134
+ font-weight : ${ theme . v1 . typography . weight . semibold } ;
135
+ background : ${ theme . v1 . palette . blue95 } ;
136
136
137
137
abbr {
138
- background-color : ${ theme . palette . blue77 } ;
138
+ background-color : ${ theme . v1 . palette . blue77 } ;
139
139
border-radius : 100px ;
140
140
display : block;
141
141
padding-top : 2px ;
0 commit comments