1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

new pool layout

This commit is contained in:
Matthias Kretschmann 2020-10-12 12:09:32 +02:00
parent 753b5c2c9c
commit 80901b5bb4
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 66 additions and 38 deletions

View File

@ -1,4 +1,9 @@
.statistics {
.tokeninfo {
margin-top: calc(var(--spacer) / 1.5);
}
.tokens {
composes: tokens from './index.module.css';
}
.title {

View File

@ -21,16 +21,24 @@ export default function PoolStatistics({
totalBalance.ocean + totalBalance.datatoken * Number(price)
return (
<div className={styles.statistics}>
<div className={styles.tokeninfo}>
<h3 className={styles.title}>Pool Statistics</h3>
<div className={styles.tokens}>
<div>
<Token symbol="OCEAN" balance={`${totalBalance.ocean}`} />
<Token symbol={dtSymbol} balance={`${totalBalance.datatoken}`} />
</div>
<div>
<Token symbol="pool shares" balance={totalPoolTokens} noIcon />
<Token symbol="% swap fee" balance={swapFee} noIcon />
</div>
<Conversion
price={`${totalLiquidityInOcean}`}
className={styles.totalLiquidity}
/>
</div>
</div>
)
}

View File

@ -1,6 +1,6 @@
.token {
font-weight: var(--font-weight-bold);
margin-bottom: calc(var(--spacer) / 3);
margin-bottom: calc(var(--spacer) / 4);
white-space: nowrap;
}
@ -17,7 +17,7 @@
padding: 0.3rem;
vertical-align: middle;
margin-right: calc(var(--spacer) / 8);
margin-top: -0.3rem;
margin-top: -0.2rem;
}
.icon svg {

View File

@ -1,12 +1,11 @@
.dataToken {
margin-bottom: var(--spacer);
padding-bottom: calc(var(--spacer) / 1.5);
font-size: var(--font-size-large);
border-bottom: 1px solid var(--brand-grey-lighter);
margin-left: -2rem;
margin-right: -2rem;
padding-left: var(--spacer);
padding-right: var(--spacer);
padding-left: calc(var(--spacer) / 1.5);
padding-right: calc(var(--spacer) / 1.5);
text-align: center;
}
@ -22,25 +21,33 @@
margin-right: calc(var(--spacer) / 3);
}
.poolTokens {
.tokeninfo {
background: var(--brand-grey-dimmed);
padding: calc(var(--spacer) / 1.5) var(--spacer) calc(var(--spacer) / 2)
var(--spacer);
border-bottom: 1px solid var(--brand-grey-lighter);
margin-left: -2rem;
margin-right: -2rem;
}
.tokens {
display: grid;
gap: var(--spacer);
grid-template-columns: 1fr 1fr;
grid-auto-flow: row;
}
.title {
font-size: var(--font-size-base);
margin-bottom: calc(var(--spacer) / 1.5);
margin-bottom: calc(var(--spacer) / 3);
}
.totalLiquidity {
composes: token from './Token.module.css';
margin-bottom: 0;
font-weight: var(--font-weight-base) !important;
font-size: var(--font-size-small);
padding-left: var(--font-size-base);
padding-top: calc(var(--spacer) / 3);
width: 100%;
border-top: 1px solid var(--brand-grey-lighter);
min-height: 24px;
}
.totalLiquidity strong {

View File

@ -145,21 +145,30 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
</div>
</div>
<div className={styles.poolTokens}>
<div className={styles.tokens}>
<div className={styles.tokeninfo}>
<h3 className={styles.title}>
Your Liquidity
<Tooltip content="Explain what this represents, advantage of providing liquidity..." />
</h3>
<div className={styles.tokens}>
<div>
<Token symbol="OCEAN" balance={`${userLiquidity.ocean}`} />
<Token symbol={dtSymbol} balance={`${userLiquidity.datatoken}`} />
<Token
symbol={dtSymbol}
balance={`${userLiquidity.datatoken}`}
/>
</div>
<div>
<Token symbol="pool shares" balance={poolTokens} noIcon />
<Token symbol="% of pool" balance={poolShare} noIcon />
</div>
<Conversion
price={`${totalUserLiquidityInOcean}`}
className={styles.totalLiquidity}
/>
</div>
</div>
<PoolStatistics
price={`${price.value}`}
@ -168,7 +177,6 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
swapFee={swapFee}
dtSymbol={dtSymbol}
/>
</div>
<div className={stylesActions.actions}>
<Button