-
Notifications
You must be signed in to change notification settings - Fork 66
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 #1153 from DistributedCollective/development
Liquidity Mining
- Loading branch information
Showing
151 changed files
with
7,098 additions
and
551 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components/macro'; | ||
import image from 'assets/images/arrow-down.svg'; | ||
|
||
const Img = styled.img` | ||
width: 40px; | ||
height: 40px; | ||
margin: 15px auto; | ||
`; | ||
|
||
export function ArrowDown() { | ||
return ( | ||
<div className="tw-flex tw-justify-center tw-items-center tw-flex-grow-0 tw-flex-shrink-0"> | ||
<Img src={image} alt="Arrow" /> | ||
</div> | ||
); | ||
} |
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 @@ | ||
export { ArrowDown } from './ArrowDown'; |
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
File renamed without changes.
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,37 @@ | ||
import React from 'react'; | ||
import { Asset } from '../../../types'; | ||
import { AssetsDictionary } from '../../../utils/dictionaries/assets-dictionary'; | ||
import styles from './index.module.css'; | ||
|
||
const symbolMap = { | ||
[Asset.RBTC]: ( | ||
<> | ||
<em>R</em>BTC | ||
</> | ||
), | ||
[Asset.USDT]: ( | ||
<> | ||
<em>R</em>USDT | ||
</> | ||
), | ||
[Asset.ETH]: ( | ||
<> | ||
ETH<em>S</em> | ||
</> | ||
), | ||
}; | ||
|
||
export function getAssetSymbol(asset: Asset) { | ||
if (symbolMap.hasOwnProperty(asset)) { | ||
return symbolMap[asset]; | ||
} | ||
return AssetsDictionary.get(asset).symbol; | ||
} | ||
|
||
interface IAssetSymbolRenderer { | ||
asset: Asset; | ||
} | ||
|
||
export const AssetSymbolRenderer: React.FC<IAssetSymbolRenderer> = ({ | ||
asset, | ||
}) => <span className={styles.symbol}>{getAssetSymbol(asset)}</span>; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
import { StyledCardRow } from './styled'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { translations } from 'locales/i18n'; | ||
|
||
interface ICardRowProps { | ||
LeftSection?: React.ReactNode; | ||
ChartSection?: React.ReactNode; | ||
DataSection?: React.ReactNode; | ||
Actions?: React.ReactNode; | ||
leftColor?: string; | ||
} | ||
export const CardRow: React.FC<ICardRowProps> = ({ | ||
LeftSection, | ||
ChartSection, | ||
DataSection, | ||
Actions, | ||
leftColor, | ||
}: ICardRowProps) => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<StyledCardRow | ||
className="d-flex tw-flex-row tw-items-center tw-mb-3 tw-rounded-lg tw-py-2.5 tw-px-4 tw-relative overflow-auto tw-justify-between" | ||
leftColor={leftColor} | ||
> | ||
{LeftSection && <div>{LeftSection}</div>} | ||
{ChartSection && ( | ||
<div className="tw-ml-2 tw-mr-3 tw-relative tw-pointer-events-none tw-max-w-13rem 2xl:tw-max-w-md 2xl:tw-ml-4 2xl:tw-mr-5"> | ||
<div className="tw-absolute tw-w-full tw-h-full tw-flex tw-items-center tw-justify-center tw-text-white tw-font-extralight tw-text-lg 2xl:tw-text-2xl tw-z-10"> | ||
{t(translations.liquidityMining.chartOverlayText)} | ||
</div> | ||
<div className="tw-opacity-20"> {ChartSection} </div> | ||
</div> | ||
)} | ||
{DataSection && <div>{DataSection}</div>} | ||
{Actions && <>{Actions}</>} | ||
</StyledCardRow> | ||
); | ||
}; |
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,15 @@ | ||
import styled from 'styled-components'; | ||
|
||
interface IStyledCardRowProps { | ||
leftColor?: string; | ||
} | ||
|
||
export const StyledCardRow = styled.div<IStyledCardRowProps>` | ||
background-color: #222222; | ||
display: flex; | ||
align-items: center; | ||
border-radius: 8px; | ||
padding-right: 10px; | ||
border-left-width: 10px; | ||
border-left-color: ${props => `${props.leftColor || '#222222'}`}; | ||
`; |
Oops, something went wrong.