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
69cdefe9
Unverified
Commit
69cdefe9
authored
Aug 22, 2022
by
Vignesh Mohankumar
Committed by
GitHub
Aug 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update Swap container padding (#4440)
* fix: update Swap container padding * rm AlertWrapper * empty
parent
61758db5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
16 deletions
+26
-16
SwapHeader.tsx
src/components/swap/SwapHeader.tsx
+2
-1
styleds.tsx
src/components/swap/styleds.tsx
+17
-1
index.tsx
src/pages/Swap/index.tsx
+7
-14
No files found.
src/components/swap/SwapHeader.tsx
View file @
69cdefe9
...
...
@@ -7,7 +7,8 @@ import { RowBetween, RowFixed } from '../Row'
import
SettingsTab
from
'
../Settings
'
const
StyledSwapHeader
=
styled
.
div
`
padding: 1rem 1.25rem 0.5rem 1.25rem;
padding: 8px 12px;
margin-bottom: 8px;
width: 100%;
color:
${({
theme
})
=>
theme
.
deprecated_text2
}
;
`
...
...
src/components/swap/styleds.tsx
View file @
69cdefe9
...
...
@@ -4,12 +4,28 @@ import { ReactNode } from 'react'
import
{
AlertTriangle
}
from
'
react-feather
'
import
{
Text
}
from
'
rebass
'
import
styled
,
{
css
}
from
'
styled-components/macro
'
import
{
Z_INDEX
}
from
'
theme
'
import
{
AutoColumn
}
from
'
../Column
'
export
const
Wrapper
=
styled
.
div
`
export
const
PageWrapper
=
styled
.
div
<
{
redesignFlag
:
boolean
}
>
`
padding: 0 8px;
max-width:
${({
redesignFlag
})
=>
(
redesignFlag
?
'
420px
'
:
'
480px
'
)}
;
width: 100%;
`
// Mostly copied from `AppBody` but it was getting too hard to maintain backwards compatibility.
export
const
SwapWrapper
=
styled
.
main
<
{
margin
?:
string
;
maxWidth
?:
string
;
redesignFlag
:
boolean
}
>
`
position: relative;
background:
${({
theme
,
redesignFlag
})
=>
(
redesignFlag
?
theme
.
backgroundSurface
:
theme
.
deprecated_bg0
)}
;
border-radius:
${({
redesignFlag
})
=>
(
redesignFlag
?
'
16px
'
:
'
24px
'
)}
;
border: 1px solid
${({
theme
,
redesignFlag
})
=>
(
redesignFlag
?
theme
.
backgroundOutline
:
'
transparent
'
)}
;
padding: 8px;
z-index:
${
Z_INDEX
.
deprecated_content
}
;
font-feature-settings:
${({
redesignFlag
})
=>
redesignFlag
&&
"
'ss02' off
"
}
;
box-shadow:
${({
redesignFlag
})
=>
!
redesignFlag
&&
'
0px 0px 1px rgba(0, 0, 0, 0.01), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 24px 32px rgba(0, 0, 0, 0.01)
'
}
;
`
export
const
ArrowWrapper
=
styled
.
div
<
{
clickable
:
boolean
;
redesignFlag
:
boolean
}
>
`
...
...
src/pages/Swap/index.tsx
View file @
69cdefe9
...
...
@@ -44,7 +44,7 @@ import Loader from '../../components/Loader'
import
{
AutoRow
}
from
'
../../components/Row
'
import
confirmPriceImpactWithoutFee
from
'
../../components/swap/confirmPriceImpactWithoutFee
'
import
ConfirmSwapModal
from
'
../../components/swap/ConfirmSwapModal
'
import
{
ArrowWrapper
,
SwapCallbackError
,
Wrapper
}
from
'
../../components/swap/styleds
'
import
{
ArrowWrapper
,
PageWrapper
,
SwapCallbackError
,
Swap
Wrapper
}
from
'
../../components/swap/styleds
'
import
SwapHeader
from
'
../../components/swap/SwapHeader
'
import
{
SwitchLocaleLink
}
from
'
../../components/SwitchLocaleLink
'
import
TokenWarningModal
from
'
../../components/TokenWarningModal
'
...
...
@@ -70,12 +70,7 @@ import { computeFiatValuePriceImpact } from '../../utils/computeFiatValuePriceIm
import
{
maxAmountSpend
}
from
'
../../utils/maxAmountSpend
'
import
{
computeRealizedPriceImpact
,
warningSeverity
}
from
'
../../utils/prices
'
import
{
supportedChainId
}
from
'
../../utils/supportedChainId
'
import
AppBody
from
'
../AppBody
'
const
AlertWrapper
=
styled
.
div
`
max-width: 460px;
width: 100%;
`
const
ArrowContainer
=
styled
.
div
`
display: inline-block;
margin-left: 6%;
...
...
@@ -508,7 +503,7 @@ export default function Swap() {
return
(
<
Trace
page=
{
PageName
.
SWAP_PAGE
}
shouldLogImpression
>
<>
{
redesignFlag
===
RedesignVariant
.
Enabled
?
(
{
redesignFlagEnabled
?
(
<
TokenSafetyModal
isOpen=
{
importTokensNotInDefault
.
length
>
0
&&
!
dismissTokenWarning
}
tokenAddress=
{
importTokensNotInDefault
[
0
]?.
address
}
...
...
@@ -524,9 +519,9 @@ export default function Swap() {
onDismiss=
{
handleDismissTokenWarning
}
/>
)
}
<
AppBody
>
<
PageWrapper
redesignFlag=
{
redesignFlagEnabled
}
>
<
SwapWrapper
id=
"swap-page"
redesignFlag=
{
redesignFlagEnabled
}
>
<
SwapHeader
allowedSlippage=
{
allowedSlippage
}
/>
<
Wrapper
id=
"swap-page"
>
<
ConfirmSwapModal
isOpen=
{
showConfirm
}
trade=
{
trade
}
...
...
@@ -820,11 +815,9 @@ export default function Swap() {
</
AutoColumn
>
</
BottomWrapper
>
</
AutoColumn
>
</
Wrapper
>
</
AppBody
>
<
AlertWrapper
>
</
SwapWrapper
>
<
NetworkAlert
/>
</
Alert
Wrapper
>
</
Page
Wrapper
>
<
SwitchLocaleLink
/>
{
!
swapIsUnsupported
?
null
:
(
<
UnsupportedCurrencyFooter
...
...
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