mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
remove liquidity: slider fixes, output user pool shares
This commit is contained in:
parent
3ea627df8d
commit
3a83bea511
@ -6,6 +6,11 @@
|
|||||||
|
|
||||||
.userLiquidity {
|
.userLiquidity {
|
||||||
composes: userLiquidity from './Add.module.css';
|
composes: userLiquidity from './Add.module.css';
|
||||||
|
max-width: 12rem;
|
||||||
|
margin-top: -1rem;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-bottom: calc(var(--spacer) / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.range {
|
.range {
|
||||||
|
@ -16,6 +16,7 @@ import FormHelp from '../../../atoms/Input/Help'
|
|||||||
import Button from '../../../atoms/Button'
|
import Button from '../../../atoms/Button'
|
||||||
import { getMaxValuesRemove } from './utils'
|
import { getMaxValuesRemove } from './utils'
|
||||||
import { graphql, useStaticQuery } from 'gatsby'
|
import { graphql, useStaticQuery } from 'gatsby'
|
||||||
|
import PriceUnit from '../../../atoms/Price/PriceUnit'
|
||||||
|
|
||||||
const contentQuery = graphql`
|
const contentQuery = graphql`
|
||||||
query PoolRemoveQuery {
|
query PoolRemoveQuery {
|
||||||
@ -139,6 +140,13 @@ export default function Remove({
|
|||||||
<Header title={content.title} backAction={() => setShowRemove(false)} />
|
<Header title={content.title} backAction={() => setShowRemove(false)} />
|
||||||
|
|
||||||
<form className={styles.removeInput}>
|
<form className={styles.removeInput}>
|
||||||
|
<div className={styles.userLiquidity}>
|
||||||
|
<div>
|
||||||
|
<span>Available:</span>
|
||||||
|
<PriceUnit price={poolTokens} symbol="pool shares" small />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className={styles.range}>
|
<div className={styles.range}>
|
||||||
<h3>{amountPercent}%</h3>
|
<h3>{amountPercent}%</h3>
|
||||||
<div className={styles.slider}>
|
<div className={styles.slider}>
|
||||||
@ -146,7 +154,6 @@ export default function Remove({
|
|||||||
type="range"
|
type="range"
|
||||||
min="0"
|
min="0"
|
||||||
max={amountMaxPercent}
|
max={amountMaxPercent}
|
||||||
step={Number(amountMaxPercent) < 10 ? '1' : '10'}
|
|
||||||
value={amountPercent}
|
value={amountPercent}
|
||||||
onChange={handleAmountPercentChange}
|
onChange={handleAmountPercentChange}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user