1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
market/src/components/organisms/AssetActions/Trade/PriceImpact.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

25 lines
494 B
CSS

.priceImpact {
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);
}
.priceImpact strong {
font-weight: var(--font-weight-base);
text-align: right;
}
.alert {
color: var(--brand-alert-red);
}
.number {
font-weight: var(--font-weight-bold);
}