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
1fd6b1e6
Unverified
Commit
1fd6b1e6
authored
Jul 13, 2020
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaking the slippage tabs for mobile again
parent
6570beef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
index.tsx
src/components/Settings/index.tsx
+5
-2
index.tsx
src/components/SlippageTabs/index.tsx
+16
-7
No files found.
src/components/Settings/index.tsx
View file @
1fd6b1e6
...
@@ -156,7 +156,7 @@ export default function SettingsTab() {
...
@@ -156,7 +156,7 @@ export default function SettingsTab() {
return
(
return
(
<
StyledMenu
ref=
{
node
}
>
<
StyledMenu
ref=
{
node
}
>
<
Modal
isOpen=
{
showConfirmation
}
onDismiss=
{
()
=>
setShowConfirmation
(
false
)
}
>
<
Modal
isOpen=
{
showConfirmation
}
onDismiss=
{
()
=>
setShowConfirmation
(
false
)
}
maxHeight=
{
100
}
>
<
ModalContentWrapper
>
<
ModalContentWrapper
>
<
AutoColumn
gap=
"lg"
>
<
AutoColumn
gap=
"lg"
>
<
RowBetween
style=
{
{
padding
:
'
0 2rem
'
}
}
>
<
RowBetween
style=
{
{
padding
:
'
0 2rem
'
}
}
>
...
@@ -233,7 +233,10 @@ export default function SettingsTab() {
...
@@ -233,7 +233,10 @@ export default function SettingsTab() {
toggleExpertMode
()
toggleExpertMode
()
setShowConfirmation
(
false
)
setShowConfirmation
(
false
)
}
}
:
()
=>
setShowConfirmation
(
true
)
:
()
=>
{
toggle
()
setShowConfirmation
(
true
)
}
}
}
/>
/>
</
RowBetween
>
</
RowBetween
>
...
...
src/components/SlippageTabs/index.tsx
View file @
1fd6b1e6
...
@@ -21,15 +21,15 @@ enum DeadlineError {
...
@@ -21,15 +21,15 @@ enum DeadlineError {
const
FancyButton
=
styled
.
button
`
const
FancyButton
=
styled
.
button
`
color:
${({
theme
})
=>
theme
.
text1
}
;
color:
${({
theme
})
=>
theme
.
text1
}
;
align-items: center;
align-items: center;
min-width: 40px;
height: 2rem;
height: 2rem;
border-radius: 36px;
border-radius: 36px;
font-size: 12px;
font-size: 12px;
width: auto;
min-width: 3rem;
border: 1px solid
${({
theme
})
=>
theme
.
bg3
}
;
border: 1px solid
${({
theme
})
=>
theme
.
bg3
}
;
outline: none;
outline: none;
background:
${({
theme
})
=>
theme
.
bg1
}
;
background:
${({
theme
})
=>
theme
.
bg1
}
;
:hover {
:hover {
cursor: inherit;
border: 1px solid
${({
theme
})
=>
theme
.
bg4
}
;
border: 1px solid
${({
theme
})
=>
theme
.
bg4
}
;
}
}
:focus {
:focus {
...
@@ -48,9 +48,8 @@ const Option = styled(FancyButton)<{ active: boolean }>`
...
@@ -48,9 +48,8 @@ const Option = styled(FancyButton)<{ active: boolean }>`
const
Input
=
styled
.
input
`
const
Input
=
styled
.
input
`
background:
${({
theme
})
=>
theme
.
bg1
}
;
background:
${({
theme
})
=>
theme
.
bg1
}
;
flex-grow: 1;
font-size: 16px;
font-size: 16px;
min-width: 60px
;
width: auto
;
outline: none;
outline: none;
&::-webkit-outer-spin-button,
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
&::-webkit-inner-spin-button {
...
@@ -64,6 +63,7 @@ const OptionCustom = styled(FancyButton)<{ active?: boolean; warning?: boolean }
...
@@ -64,6 +63,7 @@ const OptionCustom = styled(FancyButton)<{ active?: boolean; warning?: boolean }
height: 2rem;
height: 2rem;
position: relative;
position: relative;
padding: 0 0.75rem;
padding: 0 0.75rem;
flex: 1;
border:
${({
theme
,
active
,
warning
})
=>
active
&&
`1px solid
${
warning
?
theme
.
red1
:
theme
.
primary1
}
`
}
;
border:
${({
theme
,
active
,
warning
})
=>
active
&&
`1px solid
${
warning
?
theme
.
red1
:
theme
.
primary1
}
`
}
;
:hover {
:hover {
border:
${({
theme
,
active
,
warning
})
=>
border:
${({
theme
,
active
,
warning
})
=>
...
@@ -78,6 +78,13 @@ const OptionCustom = styled(FancyButton)<{ active?: boolean; warning?: boolean }
...
@@ -78,6 +78,13 @@ const OptionCustom = styled(FancyButton)<{ active?: boolean; warning?: boolean }
}
}
`
`
const
SlippageEmojiContainer
=
styled
.
span
`
color: #f3841e;
${({
theme
})
=>
theme
.
mediaWidth
.
upToSmall
`
display: none;
`
}
`
export
interface
SlippageTabsProps
{
export
interface
SlippageTabsProps
{
rawSlippage
:
number
rawSlippage
:
number
setRawSlippage
:
(
rawSlippage
:
number
)
=>
void
setRawSlippage
:
(
rawSlippage
:
number
)
=>
void
...
@@ -182,9 +189,11 @@ export default function SlippageTabs({ rawSlippage, setRawSlippage, deadline, se
...
@@ -182,9 +189,11 @@ export default function SlippageTabs({ rawSlippage, setRawSlippage, deadline, se
<
RowBetween
>
<
RowBetween
>
{
!!
slippageInput
&&
{
!!
slippageInput
&&
(
slippageError
===
SlippageError
.
RiskyLow
||
slippageError
===
SlippageError
.
RiskyHigh
)
?
(
(
slippageError
===
SlippageError
.
RiskyLow
||
slippageError
===
SlippageError
.
RiskyHigh
)
?
(
<
span
role=
"img"
aria
-
label=
"warning"
style=
{
{
color
:
'
#F3841E
'
}
}
>
<
SlippageEmojiContainer
>
⚠️
<
span
role=
"img"
aria
-
label=
"warning"
>
</
span
>
⚠️
</
span
>
</
SlippageEmojiContainer
>
)
:
null
}
)
:
null
}
<
Input
<
Input
ref=
{
inputRef
}
ref=
{
inputRef
}
...
...
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