Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
0e9f23ed
Unverified
Commit
0e9f23ed
authored
May 12, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hover text nit
parent
e08e5976
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
FiatValue.tsx
src/components/CurrencyInputPanel/FiatValue.tsx
+1
-1
index.tsx
src/components/HoverInlineText/index.tsx
+5
-5
No files found.
src/components/CurrencyInputPanel/FiatValue.tsx
View file @
0e9f23ed
...
...
@@ -25,7 +25,7 @@ export function FiatValue({
return
(
<
TYPE
.
body
fontSize=
{
14
}
color=
{
fiatValue
?
theme
.
text2
:
theme
.
text4
}
>
{
fiatValue
?
'
~
'
:
''
}
$
<
HoverInlineText
text=
{
fiatValue
?
Number
(
fiatValue
?.
toSignificant
(
6
)).
toLocaleString
(
'
en
'
)
:
'
-
'
}
/>
{
'
'
}
<
HoverInlineText
text=
{
fiatValue
?
fiatValue
?.
toSignificant
(
6
,
{
groupSeparator
:
'
,
'
}
)
:
'
-
'
}
/>
{
'
'
}
{
priceImpact
?
(
<
span
style=
{
{
color
:
priceImpactColor
}
}
>
(
{
priceImpact
.
multiply
(
-
1
).
toSignificant
(
3
)
}
%)
</
span
>
)
:
null
}
...
...
src/components/HoverInlineText/index.tsx
View file @
0e9f23ed
...
...
@@ -2,8 +2,8 @@ import Tooltip from 'components/Tooltip'
import
React
,
{
useState
}
from
'
react
'
import
styled
from
'
styled-components
'
const
TextWrapper
=
styled
.
span
<
{
margin
:
boolean
;
link
:
boolean
;
fontSize
?:
string
;
adjustSize
?:
boolean
}
>
`
position: relative
;
const
TextWrapper
=
styled
.
span
<
{
margin
:
boolean
;
link
?
:
boolean
;
fontSize
?:
string
;
adjustSize
?:
boolean
}
>
`
cursor: auto
;
margin-left:
${({
margin
})
=>
margin
&&
'
4px
'
}
;
color:
${({
theme
,
link
})
=>
(
link
?
theme
.
blue1
:
theme
.
text1
)}
;
font-size:
${({
fontSize
})
=>
fontSize
??
'
inherit
'
};
...
...
@@ -32,7 +32,7 @@ const HoverInlineText = ({
const
[
showHover
,
setShowHover
]
=
useState
(
false
)
if
(
!
text
)
{
return
<
span
></
span
>
return
<
span
/
>
}
if
(
text
.
length
>
maxCharacters
)
{
...
...
@@ -43,7 +43,7 @@ const HoverInlineText = ({
onMouseLeave=
{
()
=>
setShowHover
(
false
)
}
margin=
{
margin
}
adjustSize=
{
adjustSize
}
link=
{
!!
link
}
link=
{
link
}
fontSize=
{
fontSize
}
{
...
rest
}
>
...
...
@@ -54,7 +54,7 @@ const HoverInlineText = ({
}
return
(
<
TextWrapper
margin=
{
margin
}
adjustSize=
{
adjustSize
}
link=
{
!!
link
}
fontSize=
{
fontSize
}
{
...
rest
}
>
<
TextWrapper
margin=
{
margin
}
adjustSize=
{
adjustSize
}
link=
{
link
}
fontSize=
{
fontSize
}
{
...
rest
}
>
{
text
}
</
TextWrapper
>
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment