-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from jediswaplabs/debug-router
adding warning banner on the interface
- Loading branch information
Showing
4 changed files
with
98 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { t, Trans } from '@lingui/macro' | ||
import { useOpenModal } from 'state/application/hooks' | ||
import { ApplicationModal } from 'state/application/reducer' | ||
import styled from 'styled-components' | ||
import { ButtonText, ThemedText } from 'theme/components' | ||
import { Z_INDEX } from 'theme/zIndex' | ||
|
||
export const UK_BANNER_HEIGHT = 65 | ||
export const UK_BANNER_HEIGHT_MD = 113 | ||
export const UK_BANNER_HEIGHT_SM = 137 | ||
|
||
const BannerWrapper = styled.div` | ||
position: relative; | ||
display: flex; | ||
background-color: #ff3257; | ||
padding: 20px; | ||
border-bottom: 1px solid ${({ theme }) => theme.surface3}; | ||
z-index: ${Z_INDEX.fixed}; | ||
box-sizing: border-box; | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
@media only screen and (max-width: ${({ theme }) => `${theme.breakpoint.md}px`}) { | ||
flex-direction: column; | ||
} | ||
` | ||
|
||
const BannerTextWrapper = styled(ThemedText.BodySecondary)` | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
color: white; | ||
width: 100%; | ||
text-align: center; | ||
@media only screen and (max-width: ${({ theme }) => `${theme.breakpoint.md}px`}) { | ||
@supports (-webkit-line-clamp: 2) { | ||
white-space: initial; | ||
display: -webkit-box; | ||
-webkit-line-clamp: 2; | ||
-webkit-box-orient: vertical; | ||
} | ||
} | ||
@media only screen and (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) { | ||
@supports (-webkit-line-clamp: 3) { | ||
white-space: initial; | ||
display: -webkit-box; | ||
-webkit-line-clamp: 3; | ||
-webkit-box-orient: vertical; | ||
} | ||
} | ||
` | ||
|
||
export const bannerText = | ||
'Warning: Deposit liquidity is currently paused in v2. No swap will route through v2 pools. We recommend you remove the liquidity from Jediswap v2.' | ||
|
||
export function WarningBanner() { | ||
return ( | ||
<BannerWrapper> | ||
<BannerTextWrapper lineHeight="24px">{bannerText}</BannerTextWrapper> | ||
</BannerWrapper> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters