@@ -5,6 +5,9 @@ import { useIntl } from "react-intl"
5
5
import { Spinner } from "@chakra-ui/react"
6
6
// Import components
7
7
import Translation from "../Translation"
8
+ import Tooltip from "../Tooltip"
9
+ import Link from "../Link"
10
+ import Icon from "../Icon"
8
11
// Import utilities
9
12
import { Lang } from "../../utils/languages"
10
13
import { getData } from "../../utils/cache"
@@ -49,12 +52,40 @@ const Value = styled.code`
49
52
color: ${ ( { theme } ) => theme . colors . primary } ;
50
53
`
51
54
52
- const Label = styled . p `
55
+ const Label = styled . div `
56
+ display: flex;
57
+ flex-wrap: nowrap;
58
+ align-items: center;
53
59
text-transform: uppercase;
54
60
font-size: 0.875rem;
55
61
margin-top: 0.5rem;
56
62
`
57
63
64
+ const StyledIcon = styled ( Icon ) `
65
+ fill: ${ ( { theme } ) => theme . colors . text } ;
66
+ margin-inline-start: 0.5rem;
67
+ @media (max-width: ${ ( { theme } ) => theme . breakpoints . l } ) {
68
+ }
69
+ &:hover,
70
+ &:active,
71
+ &:focus {
72
+ fill: ${ ( { theme } ) => theme . colors . primary } ;
73
+ }
74
+ `
75
+
76
+ const BeaconchainTooltip = ( ) => (
77
+ < Tooltip
78
+ content = {
79
+ < div >
80
+ < Translation id = "data-provided-by" /> { " " }
81
+ < Link to = "https://beaconcha.in" > Beaconcha.in</ Link >
82
+ </ div >
83
+ }
84
+ >
85
+ < StyledIcon name = "info" size = "16" />
86
+ </ Tooltip >
87
+ )
88
+
58
89
// Interfaces
59
90
export interface IProps { }
60
91
@@ -128,6 +159,7 @@ const StakingStatsBox: React.FC<IProps> = () => {
128
159
) }
129
160
< Label >
130
161
< Translation id = "page-staking-stats-box-metric-1" />
162
+ < BeaconchainTooltip />
131
163
</ Label >
132
164
</ Cell >
133
165
< Cell >
@@ -140,6 +172,7 @@ const StakingStatsBox: React.FC<IProps> = () => {
140
172
) }
141
173
< Label >
142
174
< Translation id = "page-staking-stats-box-metric-2" />
175
+ < BeaconchainTooltip />
143
176
</ Label >
144
177
</ Cell >
145
178
< Cell >
@@ -152,6 +185,7 @@ const StakingStatsBox: React.FC<IProps> = () => {
152
185
) }
153
186
< Label >
154
187
< Translation id = "page-staking-stats-box-metric-3" />
188
+ < BeaconchainTooltip />
155
189
</ Label >
156
190
</ Cell >
157
191
</ Container >
0 commit comments