1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-30 22:01:44 +02:00
market/src/components/organisms/AssetActions/Trade/Slippage.module.css
Norbi e500772d21
Add price impact indicator to the trade component (#765)
* WIP

* calculate price impact by subtracting tokens fiat values

* get and use spotPrice for price impact calculation, use Decimal

* set impact to 0 if input and output values are undefined

* move price impact to a new component

* turn price impact value color to red if grater than 5

* add tooltip to price impact and slippage

* removed fiat price

* change formula

* remove console.log

* don't block add liquidity button

* typos

* proper text alignment

Co-authored-by: mihaisc <mihai@oceanprotocol.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-08-18 12:46:27 +03:00

31 lines
684 B
CSS

.slippage {
font-size: var(--font-size-small);
border-top: 1px solid var(--border-color);
margin-left: -2rem;
margin-right: -2rem;
padding: calc(var(--spacer) / 4) var(--spacer);
color: var(--color-secondary);
display: grid;
grid-template-columns: 1fr 1fr;
gap: calc(var(--spacer) / 3);
}
.slippage strong {
font-weight: var(--font-weight-base);
text-align: right;
}
.title {
font-family: var(--font-family-base);
font-weight: var(--font-weight-base);
font-size: var(--font-size-mini);
text-align: center;
margin-bottom: calc(var(--spacer) / 4);
color: var(--color-secondary);
}
.slippage select {
width: fit-content;
display: inline-block;
}