mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
pool badge for pool prices
This commit is contained in:
parent
b70fa86273
commit
b03955d618
@ -12,8 +12,11 @@
|
|||||||
font-size: var(--font-size-base);
|
font-size: var(--font-size-base);
|
||||||
}
|
}
|
||||||
|
|
||||||
.small {
|
.price.small {
|
||||||
/* lazy making-conversion-smaller-with-same-markup */
|
display: inline-block;
|
||||||
transform: scale(0.8);
|
font-size: var(--font-size-base);
|
||||||
transform-origin: left 80%;
|
}
|
||||||
|
|
||||||
|
.price.small span:first-child {
|
||||||
|
font-size: var(--font-size-small);
|
||||||
}
|
}
|
||||||
|
@ -2,3 +2,8 @@
|
|||||||
color: var(--color-secondary);
|
color: var(--color-secondary);
|
||||||
font-weight: var(--font-weight-bold);
|
font-weight: var(--font-weight-bold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left: calc(var(--spacer) / 6);
|
||||||
|
}
|
||||||
|
@ -5,6 +5,7 @@ import { DDO } from '@oceanprotocol/lib'
|
|||||||
import Loader from '../Loader'
|
import Loader from '../Loader'
|
||||||
import Tooltip from '../Tooltip'
|
import Tooltip from '../Tooltip'
|
||||||
import PriceUnit from './PriceUnit'
|
import PriceUnit from './PriceUnit'
|
||||||
|
import Badge from '../Badge'
|
||||||
|
|
||||||
export default function Price({
|
export default function Price({
|
||||||
ddo,
|
ddo,
|
||||||
@ -23,12 +24,17 @@ export default function Price({
|
|||||||
return !ocean ? (
|
return !ocean ? (
|
||||||
<div className={styles.empty}>Connect your wallet to view price</div>
|
<div className={styles.empty}>Connect your wallet to view price</div>
|
||||||
) : price?.value ? (
|
) : price?.value ? (
|
||||||
<PriceUnit
|
<>
|
||||||
price={price.value}
|
<PriceUnit
|
||||||
className={className}
|
price={price.value}
|
||||||
small={small}
|
className={className}
|
||||||
conversion={conversion}
|
small={small}
|
||||||
/>
|
conversion={conversion}
|
||||||
|
/>
|
||||||
|
{price?.type === 'pool' && (
|
||||||
|
<Badge label="pool" className={styles.badge} />
|
||||||
|
)}
|
||||||
|
</>
|
||||||
) : price?.value === '' ? (
|
) : price?.value === '' ? (
|
||||||
<div className={styles.empty}>
|
<div className={styles.empty}>
|
||||||
No price found{' '}
|
No price found{' '}
|
||||||
|
@ -12,18 +12,8 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pricewrapper {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pricewrapper button {
|
.pricewrapper button {
|
||||||
margin-top: calc(var(--spacer) / 2);
|
margin-top: var(--spacer);
|
||||||
align-self: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pricewrapper > div {
|
|
||||||
min-height: 30px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.feedback {
|
.feedback {
|
||||||
|
Loading…
Reference in New Issue
Block a user