Commit 3aa98d62 authored by aballerr's avatar aballerr Committed by GitHub

fix: reverting to previous styles (#5439)

* Fixing overlay regression caused from a commit this morning
parent 362873d9
import { style } from '@vanilla-extract/css' import { style } from '@vanilla-extract/css'
import { sprinkles } from 'nft/css/sprinkles.css' import { breakpoints, sprinkles } from 'nft/css/sprinkles.css'
export const assetsContainer = style([ export const assetsContainer = style([
sprinkles({ sprinkles({
...@@ -12,3 +12,26 @@ export const assetsContainer = style([ ...@@ -12,3 +12,26 @@ export const assetsContainer = style([
scrollbarWidth: 'none', scrollbarWidth: 'none',
}, },
]) ])
export const bagContainer = style([
sprinkles({
position: 'fixed',
top: { sm: '0', md: '72' },
width: 'full',
height: 'full',
right: '0',
background: 'backgroundSurface',
borderLeftStyle: 'solid',
borderColor: 'backgroundOutline',
borderWidth: '1px',
color: 'textPrimary',
}),
{
'@media': {
[`(min-width: ${breakpoints.md}px)`]: {
width: '360px',
height: 'calc(100vh - 72px)',
},
},
},
])
...@@ -30,7 +30,6 @@ import { combineBuyItemsWithTxRoute } from 'nft/utils/txRoute/combineItemsWithTx ...@@ -30,7 +30,6 @@ import { combineBuyItemsWithTxRoute } from 'nft/utils/txRoute/combineItemsWithTx
import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { useQuery, useQueryClient } from 'react-query' import { useQuery, useQueryClient } from 'react-query'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { Z_INDEX } from 'theme/zIndex'
import shallow from 'zustand/shallow' import shallow from 'zustand/shallow'
import * as styles from './Bag.css' import * as styles from './Bag.css'
...@@ -52,28 +51,6 @@ const DetailsPageBackground = styled.div` ...@@ -52,28 +51,6 @@ const DetailsPageBackground = styled.div`
height: 100%; height: 100%;
` `
const BagContainer = styled.div`
position: fixed;
display: flex;
flex-direction: column;
top: 0px;
width: 100%;
height: 100%;
right: 0px;
background: ${({ theme }) => theme.backgroundSurface};
border-left-style: solid;
border-color: ${({ theme }) => theme.backgroundOutline};
border-width: 1px;
color: ${({ theme }) => theme.textPrimary};
z-index: ${Z_INDEX.fixed};
@media screen and (min-width: ${({ theme }) => theme.breakpoint.md}px) {
width: 360px;
border-top-style: solid;
top: 72px;
}
`
const ScrollingIndicator = ({ top, show }: SeparatorProps) => ( const ScrollingIndicator = ({ top, show }: SeparatorProps) => (
<Box <Box
marginX="16" marginX="16"
...@@ -304,51 +281,50 @@ const Bag = () => { ...@@ -304,51 +281,50 @@ const Bag = () => {
return ( return (
<Portal> <Portal>
<BagContainer> {!(isProfilePage && profilePageState === ProfilePageStateType.LISTING) ? (
{!(isProfilePage && profilePageState === ProfilePageStateType.LISTING) ? ( <Column zIndex={isMobile || isOpen ? 'modalOverTooltip' : '3'} className={styles.bagContainer}>
<> <BagHeader
<BagHeader numberOfAssets={isProfilePage ? sellAssets.length : itemsInBag.length}
numberOfAssets={isProfilePage ? sellAssets.length : itemsInBag.length} closeBag={handleCloseBag}
closeBag={handleCloseBag} resetFlow={isProfilePage ? resetSellAssets : reset}
resetFlow={isProfilePage ? resetSellAssets : reset} isProfilePage={isProfilePage}
isProfilePage={isProfilePage} />
{shouldRenderEmptyState && <EmptyState />}
<ScrollingIndicator top show={userCanScroll && scrollProgress > 0} />
<Column ref={scrollRef} className={styles.assetsContainer} onScroll={scrollHandler} gap="12">
{isProfilePage ? <ProfileBagContent /> : <BagContent />}
</Column>
{hasAssetsToShow && !isProfilePage && (
<BagFooter
totalEthPrice={totalEthPrice}
totalUsdPrice={totalUsdPrice}
bagStatus={bagStatus}
fetchAssets={fetchAssets}
eventProperties={eventProperties}
/> />
{shouldRenderEmptyState && <EmptyState />} )}
<ScrollingIndicator top show={userCanScroll && scrollProgress > 0} /> {isSellingAssets && isProfilePage && (
<Column ref={scrollRef} className={styles.assetsContainer} onScroll={scrollHandler} gap="12"> <Box
{isProfilePage ? <ProfileBagContent /> : <BagContent />} marginTop="32"
</Column> marginX="28"
{hasAssetsToShow && !isProfilePage && ( paddingY="10"
<BagFooter className={`${buttonTextMedium} ${commonButtonStyles}`}
totalEthPrice={totalEthPrice} backgroundColor="accentAction"
totalUsdPrice={totalUsdPrice} color="white"
bagStatus={bagStatus} textAlign="center"
fetchAssets={fetchAssets} onClick={() => {
eventProperties={eventProperties} isMobile && toggleBag()
/> setProfilePageState(ProfilePageStateType.LISTING)
)} }}
{isSellingAssets && isProfilePage && ( >
<Box Continue
marginTop="32" </Box>
marginX="28" )}
paddingY="10" </Column>
className={`${buttonTextMedium} ${commonButtonStyles}`} ) : (
backgroundColor="accentAction" <ListingModal />
color="white" )}
textAlign="center"
onClick={() => {
isMobile && toggleBag()
setProfilePageState(ProfilePageStateType.LISTING)
}}
>
Continue
</Box>
)}
</>
) : (
<ListingModal />
)}
</BagContainer>
{isDetailsPage ? ( {isDetailsPage ? (
<DetailsPageBackground onClick={toggleBag} /> <DetailsPageBackground onClick={toggleBag} />
) : ( ) : (
......
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