1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-29 00:57:50 +02:00

pool badge for pool prices

This commit is contained in:
Matthias Kretschmann 2020-09-11 17:29:40 +02:00
parent b70fa86273
commit b03955d618
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 25 additions and 21 deletions

View File

@ -12,8 +12,11 @@
font-size: var(--font-size-base);
}
.small {
/* lazy making-conversion-smaller-with-same-markup */
transform: scale(0.8);
transform-origin: left 80%;
.price.small {
display: inline-block;
font-size: var(--font-size-base);
}
.price.small span:first-child {
font-size: var(--font-size-small);
}

View File

@ -2,3 +2,8 @@
color: var(--color-secondary);
font-weight: var(--font-weight-bold);
}
.badge {
vertical-align: middle;
margin-left: calc(var(--spacer) / 6);
}

View File

@ -5,6 +5,7 @@ import { DDO } from '@oceanprotocol/lib'
import Loader from '../Loader'
import Tooltip from '../Tooltip'
import PriceUnit from './PriceUnit'
import Badge from '../Badge'
export default function Price({
ddo,
@ -23,12 +24,17 @@ export default function Price({
return !ocean ? (
<div className={styles.empty}>Connect your wallet to view price</div>
) : price?.value ? (
<PriceUnit
price={price.value}
className={className}
small={small}
conversion={conversion}
/>
<>
<PriceUnit
price={price.value}
className={className}
small={small}
conversion={conversion}
/>
{price?.type === 'pool' && (
<Badge label="pool" className={styles.badge} />
)}
</>
) : price?.value === '' ? (
<div className={styles.empty}>
No price found{' '}

View File

@ -12,18 +12,8 @@
flex-shrink: 0;
}
.pricewrapper {
display: flex;
flex-wrap: wrap;
}
.pricewrapper button {
margin-top: calc(var(--spacer) / 2);
align-self: flex-end;
}
.pricewrapper > div {
min-height: 30px;
margin-top: var(--spacer);
}
.feedback {