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
bbdc2580
Unverified
Commit
bbdc2580
authored
May 23, 2020
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(search modal): prevent overlapping tooltips, always render lists
parent
27b103e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
24 deletions
+23
-24
index.tsx
src/components/QuestionHelper/index.tsx
+2
-2
index.tsx
src/components/SearchModal/index.tsx
+21
-22
No files found.
src/components/QuestionHelper/index.tsx
View file @
bbdc2580
...
@@ -22,12 +22,12 @@ const QuestionWrapper = styled.div`
...
@@ -22,12 +22,12 @@ const QuestionWrapper = styled.div`
}
}
`
`
export
default
function
QuestionHelper
({
text
}:
{
text
:
string
})
{
export
default
function
QuestionHelper
({
text
,
disabled
}:
{
text
:
string
;
disabled
?:
boolean
})
{
const
[
showPopup
,
setShowPopup
]
=
useState
<
boolean
>
(
false
)
const
[
showPopup
,
setShowPopup
]
=
useState
<
boolean
>
(
false
)
return
(
return
(
<
span
style=
{
{
marginLeft
:
4
}
}
>
<
span
style=
{
{
marginLeft
:
4
}
}
>
<
Tooltip
text=
{
text
}
showPopup=
{
showPopup
}
>
<
Tooltip
text=
{
text
}
showPopup=
{
showPopup
&&
!
disabled
}
>
<
QuestionWrapper
<
QuestionWrapper
onClick=
{
()
=>
{
onClick=
{
()
=>
{
setShowPopup
(
true
)
setShowPopup
(
true
)
...
...
src/components/SearchModal/index.tsx
View file @
bbdc2580
...
@@ -143,6 +143,7 @@ function SearchModal({
...
@@ -143,6 +143,7 @@ function SearchModal({
<
Text
fontWeight=
{
500
}
fontSize=
{
16
}
>
<
Text
fontWeight=
{
500
}
fontSize=
{
16
}
>
{
isTokenView
?
'
Select a token
'
:
'
Select a pool
'
}
{
isTokenView
?
'
Select a token
'
:
'
Select a pool
'
}
<
QuestionHelper
<
QuestionHelper
disabled=
{
tooltipOpen
}
text=
{
text=
{
isTokenView
isTokenView
?
'
Find a token by searching for its name or symbol or by pasting its address below.
'
?
'
Find a token by searching for its name or symbol or by pasting its address below.
'
...
@@ -183,28 +184,26 @@ function SearchModal({
...
@@ -183,28 +184,26 @@ function SearchModal({
</
RowBetween
>
</
RowBetween
>
</
PaddedColumn
>
</
PaddedColumn
>
<
div
style=
{
{
width
:
'
100%
'
,
height
:
'
1px
'
,
backgroundColor
:
theme
.
bg2
}
}
/>
<
div
style=
{
{
width
:
'
100%
'
,
height
:
'
1px
'
,
backgroundColor
:
theme
.
bg2
}
}
/>
{
isTokenView
{
isTokenView
?
(
?
isOpen
&&
(
<
TokenList
<
TokenList
tokens=
{
filteredTokens
}
tokens=
{
filteredTokens
}
allTokenBalances=
{
allTokenBalances
}
allTokenBalances=
{
allTokenBalances
}
onRemoveAddedToken=
{
removeTokenByAddress
}
onRemoveAddedToken=
{
removeTokenByAddress
}
onTokenSelect=
{
_onTokenSelect
}
onTokenSelect=
{
_onTokenSelect
}
otherSelectedText=
{
otherSelectedText
}
otherSelectedText=
{
otherSelectedText
}
otherToken=
{
otherSelectedTokenAddress
}
otherToken=
{
otherSelectedTokenAddress
}
selectedToken=
{
hiddenToken
}
selectedToken=
{
hiddenToken
}
showSendWithSwap=
{
showSendWithSwap
}
showSendWithSwap=
{
showSendWithSwap
}
/>
/>
)
:
(
)
<
PairList
:
isOpen
&&
(
pairs=
{
filteredPairs
}
<
PairList
focusTokenAddress=
{
focusedToken
?.
address
}
pairs=
{
filteredPairs
}
onAddLiquidity=
{
selectPair
}
focusTokenAddress=
{
focusedToken
?.
address
}
onSelectPair=
{
selectPair
}
onAddLiquidity=
{
selectPair
}
pairBalances=
{
allPairBalances
}
onSelectPair=
{
selectPair
}
/>
pairBalances=
{
allPairBalances
}
)
}
/>
)
}
<
div
style=
{
{
width
:
'
100%
'
,
height
:
'
1px
'
,
backgroundColor
:
theme
.
bg2
}
}
/>
<
div
style=
{
{
width
:
'
100%
'
,
height
:
'
1px
'
,
backgroundColor
:
theme
.
bg2
}
}
/>
<
Card
>
<
Card
>
<
AutoRow
justify=
{
'
center
'
}
>
<
AutoRow
justify=
{
'
center
'
}
>
...
...
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