-
Notifications
You must be signed in to change notification settings - Fork 915
/
styles.tsx
183 lines (162 loc) · 5.11 KB
/
styles.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable react/no-danger */
import React, { FunctionComponent } from 'react';
import { RenderingMetadata } from '../types';
interface Props {
darkMode: RenderingMetadata['darkMode'];
}
export const Styles: FunctionComponent<Props> = ({ darkMode }) => {
return (
<style
dangerouslySetInnerHTML={{
__html: `
*, *:before, *:after {
box-sizing: border-box;
}
html, body, div, span, svg {
margin: 0;
padding: 0;
border: none;
vertical-align: baseline;
}
body, html {
width: 100%;
height: 100%;
margin: 0;
display: block;
}
.osdWelcomeView {
line-height: 1.5;
background-color: ${darkMode ? '#1D1E24' : '#FFF'};
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.osdWelcomeTitle {
color: #000;
font-size: 20px;
font-family: sans-serif;
margin: 16px 0;
animation: fadeIn 1s ease-in-out;
animation-fill-mode: forwards;
opacity: 0;
animation-delay: 1.0s;
}
.osdWelcomeText {
font-family:
display: inline-block;
font-size: 14px;
font-family: sans-serif;
line-height: 40px !important;
height: 40px !important;
color: #98a2b3;
color: ${darkMode ? '#98A2B3' : '#69707D'};
}
.osdLoaderWrap {
text-align: center;
line-height: 1;
text-align: center;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial !important;
letter-spacing: -.005em;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
font-kerning: normal;
font-weight: 400;
}
.osdLoaderWrap svg {
width: 64px;
height: 64px;
margin: auto;
line-height: 1;
}
.osdLoader path {
stroke: white;
}
.osdProgress {
display: inline-block;
position: relative;
width: 32px;
height: 4px;
overflow: hidden;
background-color: ${darkMode ? '#25262E' : '#F5F7FA'};
line-height: 1;
}
.osdProgress:before {
position: absolute;
content: '';
height: 4px;
width: 100%;
top: 0;
bottom: 0;
left: 0;
transform: scaleX(0) translateX(0%);
animation: osdProgress 1s cubic-bezier(.694, .0482, .335, 1) infinite;
background-color: ${darkMode ? '#1BA9F5' : '#006DE4'};
}
.loadingLogoContainer {
height: 60px;
padding: 10px 10px 10px 10px;
}
.loadingLogo {
height: 100%;
max-width: 100%;
}
@keyframes osdProgress {
0% {
transform: scaleX(1) translateX(-100%);
}
100% {
transform: scaleX(1) translateX(100%);
}
}
`,
}}
/>
);
};