-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoadingScreen.js
executable file
·79 lines (70 loc) · 1.95 KB
/
LoadingScreen.js
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
import { Component } from 'react'
import PropTypes from 'prop-types'
import Button from './Button'
import Logo from './Logo'
export default class LoadingScreen extends Component {
static propTypes = {
onNext: PropTypes.func,
showNext: PropTypes.bool
}
static defaultProps = {
onNext: () => {},
showNext: true
}
render () {
const { onNext, showNext } = this.props
let showStyle = { visibility: 'hidden' }
if (showNext) {
showStyle = { visibility: 'visible' }
}
return (
<div className='root'>
<div className="logo">
<Logo loading={!showNext} />
</div>
<div style={showStyle} >
<p>Para brindarte información del siguiente colectivo arribando necesitamos que <strong>nos des acceso a tu localización</strong></p>
<div className='button'>
<Button fullWidth={true} color={'green'} onClick={onNext}>Continuar</Button>
</div>
</div>
<style jsx>{`
.root {
background: white;
display: flex;
flex: 1 1 100%;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 0 40px;
}
.logo {
background: #FEE379;
background-image: linear-gradient(-180deg, #FF8008 0%, #FFC837 100%);
height: 200px;
width: 200px;
border-radius: 180px;
display: flex;
align-items: center;
justify-content: center;
}
img {
max-width: 200px;
}
p {
margin-top: 50px;
text-align: center;
font-weight: 200;
font-size: 12px;
max-width: 280px;
}
.button {
margin-top: 30px;
}
`}</style>
</div>
)
}
}