@@ -3,7 +3,6 @@ import styled from 'styled-components/macro'
3
3
import tw from 'twin.macro'
4
4
import { useSpring , animated } from 'react-spring'
5
5
import { Popover , Transition } from '@headlessui/react'
6
- import { ResponsiveSubText , ResponsiveText } from 'styling/styles'
7
6
import { TooltipMessage } from 'types'
8
7
9
8
interface Props {
@@ -59,7 +58,6 @@ export const GeyserStatsBox: React.FC<Props> = ({
59
58
}
60
59
61
60
const handleMouseLeave = ( ) => {
62
- // Only close if not locked open by a click
63
61
if ( ! clicked ) {
64
62
setIsTooltipOpen ( false )
65
63
}
@@ -89,7 +87,6 @@ export const GeyserStatsBox: React.FC<Props> = ({
89
87
< GeyserStatsBoxContainer className = { `relative ${ containerClassName } ` } >
90
88
< GeyserStatsBoxLabel > { name } </ GeyserStatsBoxLabel >
91
89
< GeyserStatsBoxValueContainer >
92
- { /* Wrap Popover in a DOM element to attach ref */ }
93
90
< div ref = { popoverRef } className = "relative inline-block" >
94
91
< Popover >
95
92
< Popover . Button
@@ -117,7 +114,6 @@ export const GeyserStatsBox: React.FC<Props> = ({
117
114
< Popover . Panel
118
115
className = "absolute z-30 w-max max-w-sm mt-3 -ml-3 transform"
119
116
onClick = { ( e ) => e . stopPropagation ( ) }
120
- // Keep popover open if cursor inside the panel
121
117
onMouseEnter = { ( ) => setIsTooltipOpen ( true ) }
122
118
onMouseLeave = { ( ) => {
123
119
if ( ! clicked ) setIsTooltipOpen ( false )
@@ -142,35 +138,29 @@ export const GeyserStatsBox: React.FC<Props> = ({
142
138
}
143
139
144
140
const GeyserStatsBoxContainer = styled . div `
145
- ${ tw `w-full h-40px` }
146
- ${ tw `sm:mr-5 sm:p-3 sm:h-72px` }
141
+ ${ tw `w-full h-40px mb-3 ` }
142
+ ${ tw `sm:mr-5 sm:p-3 sm:h-72px sm:mb-0 ` }
147
143
${ tw `sm:bg-paleBlue sm:border sm:border-lightGray sm:rounded-sm` }
148
144
`
149
145
150
146
const GeyserStatsBoxLabel = styled . span `
151
- ${ ResponsiveText }
152
147
${ tw `mb-1 flex font-light relative` }
153
148
`
154
149
155
150
const GeyserStatsBoxValueContainer = styled . div `
156
151
${ tw `flex flex-row` }
157
152
`
158
153
159
- const GeyserStatsBoxValue = styled . span `
160
- ${ ResponsiveText }
161
- `
154
+ const GeyserStatsBoxValue = styled . span ``
162
155
163
156
const GeyserStatsBoxValueWithTooltip = styled . span `
164
- ${ ResponsiveText }
165
- ${ tw `cursor-pointer border-b border-dotted border-darkGray transition-all ease-out duration-100` }
157
+ ${ tw `cursor-pointer border-b border-dotted border-darkGray transition-all ease-out duration-100` }
166
158
&:hover {
167
159
${ tw `border-b-2 border-greenDark border-dashed` }
168
160
}
169
161
`
170
162
171
- const GeyserStatsBoxUnits = styled . span `
172
- ${ ResponsiveSubText }
173
- `
163
+ const GeyserStatsBoxUnits = styled . span ``
174
164
175
165
const TooltipOuterLayer = styled . div `
176
166
${ tw `shadow-all max-w-sm rounded-lg overflow-hidden ring-1 ring-black ring-opacity-5` }
@@ -185,11 +175,9 @@ const TooltipMessageContainer = styled.div`
185
175
`
186
176
187
177
const TooltipTitle = styled . p `
188
- ${ ResponsiveText }
189
- ${ tw `text-gray mb-2` }
178
+ ${ tw `text-gray text-lg mb-2` }
190
179
`
191
180
192
181
const TooltipBody = styled . div `
193
- ${ ResponsiveSubText }
194
- ${ tw `text-white text-left font-semiBold` }
182
+ ${ tw `text-white text-left font-semiBold sm:leading-5 text-sm` }
195
183
`
0 commit comments