1
1
import React , { useState } from 'react' ;
2
2
import styled from 'styled-components' ;
3
- import { FaSyncAlt , FaTimesCircle } from 'react-icons/fa' ;
3
+ import { FaTimesCircle as DismissIcon } from 'react-icons/fa' ;
4
+ import { MdRefresh as RefreshIcon } from 'react-icons/md' ;
4
5
import { APP_NAME_FULL } from '../../../../shared/constants' ;
5
6
6
7
const UpdateNoticeContainer = styled . div `
7
- max-width: 560px ;
8
+ max-width: 360px ;
8
9
position: relative;
9
- background-color: #fff ;
10
- border: 1px solid #ffb74d ;
11
- padding: 8px 8px ;
12
- border-radius: 4px ;
10
+ border: 2px solid #ff8f34 ;
11
+ box-sizing: border-box ;
12
+ padding: 8px 16px ;
13
+ border-radius: 10px ;
13
14
color: #000;
14
- background-color: #fff3e0 ;
15
+ background-color: #fff !important ;
15
16
16
17
font-family: sans-serif;
17
18
text-align: center;
18
19
font-size: 14px;
19
20
font-weight: 400;
20
21
font-style: normal;
21
- box-shadow: 0 1px 6px 0 rgba(32, 33, 36, 0.28);
22
+ box-shadow: 0 4px 10px 0 rgb(0 0 0 / 20%), 0 4px 20px 0 rgb(0 0 0 / 19%);
23
+ line-height: 22px;
22
24
` ;
23
25
24
26
const ExtensionNameContainerSpan = styled . span `
25
- background-color: rgb(233, 115, 46 );
26
- color: #fff ;
27
- padding: 2px 4px ;
27
+ background-color: rgb(255, 196, 161 );
28
+ color: #000 ;
29
+ padding: 2px 6px ;
28
30
border-radius: 4px;
29
31
font-weight: 600;
30
32
` ;
@@ -42,12 +44,16 @@ const ActionButton = styled.div`
42
44
display: flex;
43
45
align-items: center;
44
46
transition: all 0.05s ease-in;
45
- padding: 2px 6px ;
47
+ padding: 4px 8px ;
46
48
border-radius: 4px;
47
49
50
+ text-decoration: underline;
51
+
48
52
&:hover {
49
- background-color: rgb(233, 115, 46);
50
- color: #fff;
53
+ background-color: ${ ( props ) =>
54
+ props . action === 'reload' ? '#198754' : 'gray' } ;
55
+ color: ${ ( props ) => ( props . action === 'reload' ? '#fff' : '#fff' ) } ;
56
+ text-decoration: none;
51
57
}
52
58
` ;
53
59
@@ -60,7 +66,7 @@ const UpdateNotice = () => {
60
66
< div
61
67
style = { {
62
68
position : 'fixed' ,
63
- bottom : 5 ,
69
+ bottom : 10 ,
64
70
left : 0 ,
65
71
right : 0 ,
66
72
display : 'flex' ,
@@ -78,21 +84,23 @@ const UpdateNotice = () => {
78
84
</ div >
79
85
< ActionButtonsContainer >
80
86
< ActionButton
87
+ action = { 'reload' }
81
88
onClick = { ( ) => {
82
89
localStorage . removeItem ( 'vt-update-notice-dismissed' ) ;
83
90
window . location . reload ( ) ;
84
91
} }
85
92
>
86
- < FaSyncAlt size = "12px " style = { { marginRight : '4px' } } />
93
+ < RefreshIcon size = "20px " style = { { marginRight : '4px' } } />
87
94
Refresh Now
88
95
</ ActionButton >
89
96
< ActionButton
97
+ action = { 'dismiss' }
90
98
onClick = { ( ) => {
91
99
localStorage . setItem ( 'vt-update-notice-dismissed' , 'true' ) ;
92
100
setShouldDisplay ( false ) ;
93
101
} }
94
102
>
95
- < FaTimesCircle size = "12px " style = { { marginRight : '4px' } } />
103
+ < DismissIcon size = "16px " style = { { marginRight : '4px' } } />
96
104
Dismiss
97
105
</ ActionButton >
98
106
</ ActionButtonsContainer >
0 commit comments