Commit ec3552bb authored by Jack Short's avatar Jack Short Committed by GitHub

style: updating bag styles (#4724)

* updating footer

* bag optimizations

* correct margins for price change rows

* pay button color

* adding fiat values

* using bodySmall
parent 57836026
...@@ -17,7 +17,7 @@ export const bagContainer = style([ ...@@ -17,7 +17,7 @@ export const bagContainer = style([
{ {
'@media': { '@media': {
[`(min-width: ${breakpoints.md}px)`]: { [`(min-width: ${breakpoints.md}px)`]: {
width: '316px', width: '360px',
height: 'calc(100vh - 72px)', height: 'calc(100vh - 72px)',
}, },
}, },
...@@ -26,7 +26,7 @@ export const bagContainer = style([ ...@@ -26,7 +26,7 @@ export const bagContainer = style([
export const assetsContainer = style([ export const assetsContainer = style([
sprinkles({ sprinkles({
paddingX: '32', paddingX: '16',
maxHeight: 'full', maxHeight: 'full',
overflowY: 'scroll', overflowY: 'scroll',
}), }),
......
...@@ -323,6 +323,7 @@ const Bag = () => { ...@@ -323,6 +323,7 @@ const Bag = () => {
{unavailableAssets.length > 0 && ( {unavailableAssets.length > 0 && (
<UnavailableAssetsHeaderRow <UnavailableAssetsHeaderRow
assets={unavailableAssets} assets={unavailableAssets}
usdPrice={fetchedPriceData}
clearUnavailableAssets={() => setItemsInBag(availableItems)} clearUnavailableAssets={() => setItemsInBag(availableItems)}
didOpenUnavailableAssets={didOpenUnavailableAssets} didOpenUnavailableAssets={didOpenUnavailableAssets}
setDidOpenUnavailableAssets={setDidOpenUnavailableAssets} setDidOpenUnavailableAssets={setDidOpenUnavailableAssets}
...@@ -333,6 +334,7 @@ const Bag = () => { ...@@ -333,6 +334,7 @@ const Bag = () => {
<PriceChangeBagRow <PriceChangeBagRow
key={asset.id} key={asset.id}
asset={asset} asset={asset}
usdPrice={fetchedPriceData}
markAssetAsReviewed={markAssetAsReviewed} markAssetAsReviewed={markAssetAsReviewed}
top={index === 0 && unavailableAssets.length === 0} top={index === 0 && unavailableAssets.length === 0}
isMobile={isMobile} isMobile={isMobile}
...@@ -344,6 +346,7 @@ const Bag = () => { ...@@ -344,6 +346,7 @@ const Bag = () => {
<BagRow <BagRow
key={asset.id} key={asset.id}
asset={asset} asset={asset}
usdPrice={fetchedPriceData}
removeAsset={removeAssetFromBag} removeAsset={removeAssetFromBag}
showRemove={true} showRemove={true}
isMobile={isMobile} isMobile={isMobile}
......
...@@ -9,7 +9,7 @@ export const footerContainer = sprinkles({ ...@@ -9,7 +9,7 @@ export const footerContainer = sprinkles({
export const footer = style([ export const footer = style([
sprinkles({ sprinkles({
background: 'backgroundSurface', background: 'backgroundModule',
color: 'textPrimary', color: 'textPrimary',
paddingX: '16', paddingX: '16',
paddingY: '12', paddingY: '12',
...@@ -38,7 +38,6 @@ export const payButton = style([ ...@@ -38,7 +38,6 @@ export const payButton = style([
body, body,
sprinkles({ sprinkles({
background: 'blue400', background: 'blue400',
color: 'textPrimary',
border: 'none', border: 'none',
borderRadius: '12', borderRadius: '12',
paddingY: '12', paddingY: '12',
...@@ -54,19 +53,3 @@ export const payButton = style([ ...@@ -54,19 +53,3 @@ export const payButton = style([
}, },
}, },
]) ])
export const ethPill = style([
sprinkles({
background: 'backgroundSurface',
gap: '8',
paddingY: '4',
paddingLeft: '4',
paddingRight: '12',
fontSize: '20',
fontWeight: 'semibold',
borderRadius: 'round',
}),
{
lineHeight: '24px',
},
])
import { BigNumber } from '@ethersproject/bignumber' import { BigNumber } from '@ethersproject/bignumber'
import ethereumLogoUrl from 'assets/images/ethereum-logo.png'
import Loader from 'components/Loader' import Loader from 'components/Loader'
import { Box } from 'nft/components/Box' import { Box } from 'nft/components/Box'
import { Column, Row } from 'nft/components/Flex' import { Column, Row } from 'nft/components/Flex'
import { bodySmall, headlineMedium, subheadSmall } from 'nft/css/common.css' import { bodySmall, headlineSmall } from 'nft/css/common.css'
import { BagStatus } from 'nft/types' import { BagStatus } from 'nft/types'
import { ethNumberStandardFormatter, formatWeiToDecimal } from 'nft/utils/currency' import { ethNumberStandardFormatter, formatWeiToDecimal } from 'nft/utils'
import { useModalIsOpen, useToggleWalletModal } from 'state/application/hooks' import { useModalIsOpen, useToggleWalletModal } from 'state/application/hooks'
import { ApplicationModal } from 'state/application/reducer' import { ApplicationModal } from 'state/application/reducer'
...@@ -61,20 +60,18 @@ export const BagFooter = ({ ...@@ -61,20 +60,18 @@ export const BagFooter = ({
borderTopRightRadius={showWarning ? '0' : '12'} borderTopRightRadius={showWarning ? '0' : '12'}
className={styles.footer} className={styles.footer}
> >
<Box marginBottom="8" style={{ lineHeight: '20px', opacity: '0.54' }} className={subheadSmall}> <Column gap="4" paddingTop="8" paddingBottom="20">
Total
</Box>
<Column marginBottom="16">
<Row justifyContent="space-between"> <Row justifyContent="space-between">
<Box className={headlineMedium}>{`${formatWeiToDecimal(totalEthPrice.toString())}`}</Box> <Box fontWeight="semibold" className={headlineSmall}>
<Row className={styles.ethPill}> Total
<Box as="img" src={ethereumLogoUrl} alt="Ethereum" width="24" height="24" /> </Box>
ETH <Box fontWeight="semibold" className={headlineSmall}>
</Row> {`${formatWeiToDecimal(totalEthPrice.toString())} ETH`}
</Box>
</Row> </Row>
<Box fontWeight="normal" style={{ lineHeight: '20px', opacity: '0.6' }} className={bodySmall}> <Row justifyContent="flex-end" color="textSecondary" className={bodySmall}>
{`${ethNumberStandardFormatter(totalUsdPrice, true)}`} {`${ethNumberStandardFormatter(totalUsdPrice, true)}`}
</Box> </Row>
</Column> </Column>
<Row <Row
as="button" as="button"
...@@ -89,7 +86,7 @@ export const BagFooter = ({ ...@@ -89,7 +86,7 @@ export const BagFooter = ({
} }
}} }}
> >
{isPending && <Loader size="20px" stroke="backgroundSurface" />} {isPending && <Loader size="20px" stroke="white" />}
{!isConnected || walletModalIsOpen {!isConnected || walletModalIsOpen
? 'Connect wallet' ? 'Connect wallet'
: bagStatus === BagStatus.FETCHING_FINAL_ROUTE || bagStatus === BagStatus.CONFIRMING_IN_WALLET : bagStatus === BagStatus.FETCHING_FINAL_ROUTE || bagStatus === BagStatus.CONFIRMING_IN_WALLET
......
...@@ -5,7 +5,8 @@ import { sprinkles, themeVars, vars } from 'nft/css/sprinkles.css' ...@@ -5,7 +5,8 @@ import { sprinkles, themeVars, vars } from 'nft/css/sprinkles.css'
export const bagRow = style([ export const bagRow = style([
sprinkles({ sprinkles({
color: 'textPrimary', color: 'textPrimary',
padding: '4', paddingX: '12',
paddingY: '8',
gap: '12', gap: '12',
cursor: 'pointer', cursor: 'pointer',
height: 'full', height: 'full',
...@@ -15,7 +16,7 @@ export const bagRow = style([ ...@@ -15,7 +16,7 @@ export const bagRow = style([
marginLeft: '-4px', marginLeft: '-4px',
marginRight: '-4px', marginRight: '-4px',
':hover': { ':hover': {
background: themeVars.colors.backgroundOutline, background: themeVars.colors.backgroundModule,
}, },
}, },
]) ])
...@@ -25,6 +26,7 @@ export const unavailableAssetsContainer = sprinkles({ ...@@ -25,6 +26,7 @@ export const unavailableAssetsContainer = sprinkles({
gap: '12', gap: '12',
color: 'textPrimary', color: 'textPrimary',
paddingY: '16', paddingY: '16',
marginX: '8',
borderStyle: 'solid', borderStyle: 'solid',
borderWidth: '1px', borderWidth: '1px',
borderColor: 'transparent', borderColor: 'transparent',
...@@ -38,6 +40,7 @@ export const priceChangeColumn = sprinkles({ ...@@ -38,6 +40,7 @@ export const priceChangeColumn = sprinkles({
gap: '8', gap: '8',
color: 'textPrimary', color: 'textPrimary',
paddingY: '16', paddingY: '16',
marginX: '8',
borderStyle: 'solid', borderStyle: 'solid',
borderWidth: '1px', borderWidth: '1px',
borderColor: 'transparent', borderColor: 'transparent',
...@@ -47,15 +50,11 @@ export const priceChangeColumn = sprinkles({ ...@@ -47,15 +50,11 @@ export const priceChangeColumn = sprinkles({
}) })
export const priceChangeRow = style([ export const priceChangeRow = style([
bodySmall,
sprinkles({ sprinkles({
color: 'textTertiary', color: 'gold',
gap: '4', gap: '4',
fontSize: '14',
fontWeight: 'normal',
}), }),
{
lineHeight: '20px',
},
]) ])
export const unavailableAssetRow = style([ export const unavailableAssetRow = style([
...@@ -113,9 +112,20 @@ export const removeButton = style([ ...@@ -113,9 +112,20 @@ export const removeButton = style([
}, },
]) ])
export const removeBagRowButton = style([
buttonTextSmall,
sprinkles({
background: 'backgroundInteractive',
color: 'textPrimary',
paddingX: '14',
paddingY: '12',
borderRadius: '12',
}),
])
export const bagRowImage = sprinkles({ export const bagRowImage = sprinkles({
width: '72', width: '56',
height: '72', height: '56',
borderRadius: '8', borderRadius: '8',
}) })
...@@ -132,19 +142,12 @@ export const unavailableImage = style([ ...@@ -132,19 +142,12 @@ export const unavailableImage = style([
}), }),
]) ])
export const removeAssetOverlay = style([
sprinkles({
position: 'absolute',
right: '4',
top: '4',
}),
])
export const bagRowPrice = style([ export const bagRowPrice = style([
sprinkles({ sprinkles({
gap: '4', gap: '4',
fontSize: '16', fontSize: '16',
fontWeight: 'normal', fontWeight: 'semibold',
flexShrink: '0',
}), }),
{ {
lineHeight: '24px', lineHeight: '24px',
...@@ -153,27 +156,25 @@ export const bagRowPrice = style([ ...@@ -153,27 +156,25 @@ export const bagRowPrice = style([
export const assetName = style([ export const assetName = style([
sprinkles({ sprinkles({
fontSize: '14', fontSize: '16',
fontWeight: 'semibold', fontWeight: 'medium',
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}), }),
{ {
lineHeight: '20px', lineHeight: '24px',
}, },
]) ])
export const collectionName = style([ export const collectionName = style([
buttonTextSmall, bodySmall,
sprinkles({ sprinkles({
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
color: 'textSecondary',
}), }),
{
lineHeight: '20px',
},
]) ])
export const icon = sprinkles({ export const icon = sprinkles({
......
import { BigNumber } from '@ethersproject/bignumber' import { BigNumber } from '@ethersproject/bignumber'
import { formatEther } from '@ethersproject/units'
import clsx from 'clsx' import clsx from 'clsx'
import { TimedLoader } from 'nft/components/bag/TimedLoader' import { TimedLoader } from 'nft/components/bag/TimedLoader'
import { Box } from 'nft/components/Box' import { Box } from 'nft/components/Box'
...@@ -6,16 +7,15 @@ import { Column, Row } from 'nft/components/Flex' ...@@ -6,16 +7,15 @@ import { Column, Row } from 'nft/components/Flex'
import { import {
ChevronDownBagIcon, ChevronDownBagIcon,
ChevronUpBagIcon, ChevronUpBagIcon,
CircularCloseIcon,
CloseTimerIcon, CloseTimerIcon,
SquareArrowDownIcon, SquareArrowDownIcon,
SquareArrowUpIcon, SquareArrowUpIcon,
VerifiedIcon, VerifiedIcon,
} from 'nft/components/icons' } from 'nft/components/icons'
import { bodySmall } from 'nft/css/common.css'
import { loadingBlock } from 'nft/css/loading.css' import { loadingBlock } from 'nft/css/loading.css'
import { GenieAsset, UpdatedGenieAsset } from 'nft/types' import { GenieAsset, UpdatedGenieAsset } from 'nft/types'
import { getAssetHref } from 'nft/utils/asset' import { ethNumberStandardFormatter, formatWeiToDecimal, getAssetHref } from 'nft/utils'
import { formatWeiToDecimal } from 'nft/utils/currency'
import { MouseEvent, useEffect, useReducer, useRef, useState } from 'react' import { MouseEvent, useEffect, useReducer, useRef, useState } from 'react'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
...@@ -44,13 +44,14 @@ const NoContentContainer = () => ( ...@@ -44,13 +44,14 @@ const NoContentContainer = () => (
interface BagRowProps { interface BagRowProps {
asset: UpdatedGenieAsset asset: UpdatedGenieAsset
usdPrice: number | undefined
removeAsset: (asset: GenieAsset) => void removeAsset: (asset: GenieAsset) => void
showRemove?: boolean showRemove?: boolean
grayscale?: boolean grayscale?: boolean
isMobile: boolean isMobile: boolean
} }
export const BagRow = ({ asset, removeAsset, showRemove, grayscale, isMobile }: BagRowProps) => { export const BagRow = ({ asset, usdPrice, removeAsset, showRemove, grayscale, isMobile }: BagRowProps) => {
const [cardHovered, setCardHovered] = useState(false) const [cardHovered, setCardHovered] = useState(false)
const [loadedImage, setImageLoaded] = useState(false) const [loadedImage, setImageLoaded] = useState(false)
const [noImageAvailable, setNoImageAvailable] = useState(!asset.smallImageUrl) const [noImageAvailable, setNoImageAvailable] = useState(!asset.smallImageUrl)
...@@ -63,20 +64,6 @@ export const BagRow = ({ asset, removeAsset, showRemove, grayscale, isMobile }: ...@@ -63,20 +64,6 @@ export const BagRow = ({ asset, removeAsset, showRemove, grayscale, isMobile }:
<Link to={getAssetHref(asset)} style={{ textDecoration: 'none' }}> <Link to={getAssetHref(asset)} style={{ textDecoration: 'none' }}>
<Row ref={assetCardRef} className={styles.bagRow} onMouseEnter={handleCardHover} onMouseLeave={handleCardHover}> <Row ref={assetCardRef} className={styles.bagRow} onMouseEnter={handleCardHover} onMouseLeave={handleCardHover}>
<Box position="relative" display="flex"> <Box position="relative" display="flex">
<Box
display={showRemove ? 'block' : 'none'}
className={styles.removeAssetOverlay}
onClick={(e: MouseEvent) => {
e.preventDefault()
e.stopPropagation()
removeAsset(asset)
}}
transition="250"
style={{ opacity: cardHovered || isMobile ? '1' : '0' }}
zIndex="1"
>
<CircularCloseIcon />
</Box>
{!noImageAvailable && ( {!noImageAvailable && (
<Box <Box
as="img" as="img"
...@@ -95,27 +82,47 @@ export const BagRow = ({ asset, removeAsset, showRemove, grayscale, isMobile }: ...@@ -95,27 +82,47 @@ export const BagRow = ({ asset, removeAsset, showRemove, grayscale, isMobile }:
{!loadedImage && <Box position="absolute" className={`${styles.bagRowImage} ${loadingBlock}`} />} {!loadedImage && <Box position="absolute" className={`${styles.bagRowImage} ${loadingBlock}`} />}
{noImageAvailable && <NoContentContainer />} {noImageAvailable && <NoContentContainer />}
</Box> </Box>
<Column <Column overflow="hidden" width="full" color={grayscale ? 'textSecondary' : 'textPrimary'}>
overflow="hidden" <Row overflow="hidden" width="full" justifyContent="space-between" whiteSpace="nowrap" gap="16">
height="full" <Box className={styles.assetName}>{asset.name || asset.tokenId}</Box>
justifyContent="space-between" </Row>
color={grayscale ? 'textSecondary' : 'textPrimary'} <Row overflow="hidden" whiteSpace="nowrap" gap="2">
> <Box className={styles.collectionName}>{asset.collectionName}</Box>
<Column> {asset.collectionIsVerified && <VerifiedIcon className={styles.icon} />}
<Row overflow="hidden" whiteSpace="nowrap" gap="2">
<Box className={styles.assetName}>{asset.name || asset.tokenId}</Box>
</Row>
<Row overflow="hidden" whiteSpace="nowrap" gap="2">
<Box className={styles.collectionName}>{asset.collectionName}</Box>
{asset.collectionIsVerified && <VerifiedIcon className={styles.icon} />}
</Row>
</Column>
<Row className={styles.bagRowPrice}>
{`${formatWeiToDecimal(
asset.updatedPriceInfo ? asset.updatedPriceInfo.ETHPrice : asset.priceInfo.ETHPrice
)} ETH`}
</Row> </Row>
</Column> </Column>
{cardHovered && showRemove && (
<Box
marginLeft="16"
className={styles.removeBagRowButton}
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
removeAsset(asset)
}}
>
Remove
</Box>
)}
{(!cardHovered || !showRemove) && (
<Column flexShrink="0">
<Box className={styles.bagRowPrice}>
{`${formatWeiToDecimal(
asset.updatedPriceInfo ? asset.updatedPriceInfo.ETHPrice : asset.priceInfo.ETHPrice
)} ETH`}
</Box>
<Box className={styles.collectionName}>
{`${ethNumberStandardFormatter(
usdPrice
? parseFloat(
formatEther(asset.updatedPriceInfo ? asset.updatedPriceInfo.ETHPrice : asset.priceInfo.ETHPrice)
) * usdPrice
: usdPrice,
true
)}`}
</Box>
</Column>
)}
</Row> </Row>
</Link> </Link>
) )
...@@ -123,12 +130,13 @@ export const BagRow = ({ asset, removeAsset, showRemove, grayscale, isMobile }: ...@@ -123,12 +130,13 @@ export const BagRow = ({ asset, removeAsset, showRemove, grayscale, isMobile }:
interface PriceChangeBagRowProps { interface PriceChangeBagRowProps {
asset: UpdatedGenieAsset asset: UpdatedGenieAsset
usdPrice: number | undefined
markAssetAsReviewed: (asset: UpdatedGenieAsset, toKeep: boolean) => void markAssetAsReviewed: (asset: UpdatedGenieAsset, toKeep: boolean) => void
top?: boolean top?: boolean
isMobile: boolean isMobile: boolean
} }
export const PriceChangeBagRow = ({ asset, markAssetAsReviewed, top, isMobile }: PriceChangeBagRowProps) => { export const PriceChangeBagRow = ({ asset, usdPrice, markAssetAsReviewed, top, isMobile }: PriceChangeBagRowProps) => {
const isPriceIncrease = BigNumber.from(asset.updatedPriceInfo?.ETHPrice).gt(BigNumber.from(asset.priceInfo.ETHPrice)) const isPriceIncrease = BigNumber.from(asset.updatedPriceInfo?.ETHPrice).gt(BigNumber.from(asset.priceInfo.ETHPrice))
return ( return (
<Column className={styles.priceChangeColumn} borderTopColor={top ? 'backgroundOutline' : 'transparent'}> <Column className={styles.priceChangeColumn} borderTopColor={top ? 'backgroundOutline' : 'transparent'}>
...@@ -138,7 +146,9 @@ export const PriceChangeBagRow = ({ asset, markAssetAsReviewed, top, isMobile }: ...@@ -138,7 +146,9 @@ export const PriceChangeBagRow = ({ asset, markAssetAsReviewed, top, isMobile }:
asset.priceInfo.ETHPrice asset.priceInfo.ETHPrice
)} ETH`}</Box> )} ETH`}</Box>
</Row> </Row>
<BagRow asset={asset} removeAsset={() => undefined} isMobile={isMobile} /> <Box style={{ marginLeft: '-8px', marginRight: '-8px' }}>
<BagRow asset={asset} usdPrice={usdPrice} removeAsset={() => undefined} isMobile={isMobile} />
</Box>
<Row gap="12" justifyContent="space-between"> <Row gap="12" justifyContent="space-between">
<Box <Box
className={styles.removeButton} className={styles.removeButton}
...@@ -167,6 +177,7 @@ export const PriceChangeBagRow = ({ asset, markAssetAsReviewed, top, isMobile }: ...@@ -167,6 +177,7 @@ export const PriceChangeBagRow = ({ asset, markAssetAsReviewed, top, isMobile }:
interface UnavailableAssetsHeaderRowProps { interface UnavailableAssetsHeaderRowProps {
assets?: UpdatedGenieAsset[] assets?: UpdatedGenieAsset[]
usdPrice: number | undefined
clearUnavailableAssets: () => void clearUnavailableAssets: () => void
didOpenUnavailableAssets: boolean didOpenUnavailableAssets: boolean
setDidOpenUnavailableAssets: (didOpen: boolean) => void setDidOpenUnavailableAssets: (didOpen: boolean) => void
...@@ -199,7 +210,7 @@ const UnavailableAssetsPreview = ({ assets }: UnavailableAssetsPreviewProps) => ...@@ -199,7 +210,7 @@ const UnavailableAssetsPreview = ({ assets }: UnavailableAssetsPreviewProps) =>
borderWidth="1px" borderWidth="1px"
borderColor="backgroundSurface" borderColor="backgroundSurface"
borderRadius="4" borderRadius="4"
style={{ zIndex: assets.length - index }} style={{ zIndex: index }}
className={styles.grayscaleImage} className={styles.grayscaleImage}
/> />
))} ))}
...@@ -208,6 +219,7 @@ const UnavailableAssetsPreview = ({ assets }: UnavailableAssetsPreviewProps) => ...@@ -208,6 +219,7 @@ const UnavailableAssetsPreview = ({ assets }: UnavailableAssetsPreviewProps) =>
export const UnavailableAssetsHeaderRow = ({ export const UnavailableAssetsHeaderRow = ({
assets, assets,
usdPrice,
clearUnavailableAssets, clearUnavailableAssets,
didOpenUnavailableAssets, didOpenUnavailableAssets,
setDidOpenUnavailableAssets, setDidOpenUnavailableAssets,
...@@ -237,24 +249,9 @@ export const UnavailableAssetsHeaderRow = ({ ...@@ -237,24 +249,9 @@ export const UnavailableAssetsHeaderRow = ({
return ( return (
<Column className={styles.unavailableAssetsContainer}> <Column className={styles.unavailableAssetsContainer}>
<Row className={styles.priceChangeRow} justifyContent="space-between"> {assets.length === 1 && (
No longer available for sale <BagRow asset={assets[0]} usdPrice={usdPrice} removeAsset={() => undefined} grayscale isMobile={isMobile} />
{!didOpenUnavailableAssets && ( )}
<Row
position="relative"
width="20"
height="20"
color="textPrimary"
justifyContent="center"
cursor="pointer"
onClick={() => clearUnavailableAssets()}
>
<TimedLoader />
<CloseTimerIcon />
</Row>
)}
</Row>
{assets.length === 1 && <BagRow asset={assets[0]} removeAsset={() => undefined} grayscale isMobile={isMobile} />}
{assets.length > 1 && ( {assets.length > 1 && (
<Column> <Column>
<Row <Row
...@@ -266,16 +263,37 @@ export const UnavailableAssetsHeaderRow = ({ ...@@ -266,16 +263,37 @@ export const UnavailableAssetsHeaderRow = ({
toggleOpen() toggleOpen()
}} }}
> >
<Row gap="12" fontSize="14" color="textSecondary" fontWeight="normal" style={{ lineHeight: '20px' }}> <Row gap="12" color="textPrimary" className={bodySmall}>
{!isOpen && <UnavailableAssetsPreview assets={assets.slice(0, 5)} />} {!isOpen && <UnavailableAssetsPreview assets={assets.slice(0, 5)} />}
{`${assets.length} unavailable NFTs`} No longer available
</Row> </Row>
<Row color="textSecondary">{isOpen ? <ChevronUpBagIcon /> : <ChevronDownBagIcon />}</Row> <Row color="textSecondary">{isOpen ? <ChevronUpBagIcon /> : <ChevronDownBagIcon />}</Row>
{!didOpenUnavailableAssets && (
<Row
position="relative"
width="20"
height="20"
color="textPrimary"
justifyContent="center"
cursor="pointer"
onClick={() => clearUnavailableAssets()}
>
<TimedLoader />
<CloseTimerIcon />
</Row>
)}
</Row> </Row>
<Column gap="8"> <Column gap="8" style={{ marginLeft: '-8px', marginRight: '-8px' }}>
{isOpen && {isOpen &&
assets.map((asset) => ( assets.map((asset) => (
<BagRow key={asset.id} asset={asset} removeAsset={() => undefined} grayscale isMobile={isMobile} /> <BagRow
key={asset.id}
asset={asset}
usdPrice={usdPrice}
removeAsset={() => undefined}
grayscale
isMobile={isMobile}
/>
))} ))}
</Column> </Column>
</Column> </Column>
......
export * from './asset'
export * from './buildActivityAsset' export * from './buildActivityAsset'
export * from './buildSellObject' export * from './buildSellObject'
export * from './calcPoolPrice' export * from './calcPoolPrice'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment