Commit f6ffc68e authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

fix: update bag header layout (#5005)

* fix: update-bag-header

* pr feedback
parent b3c44f20
import { style } from '@vanilla-extract/css' import { style } from '@vanilla-extract/css'
import { headlineSmall } from 'nft/css/common.css' import { headlineSmall } from 'nft/css/common.css'
import { sprinkles, vars } from 'nft/css/sprinkles.css' import { sprinkles } from 'nft/css/sprinkles.css'
export const header = style([ export const header = style([
headlineSmall, headlineSmall,
...@@ -12,16 +12,3 @@ export const header = style([ ...@@ -12,16 +12,3 @@ export const header = style([
lineHeight: '24px', lineHeight: '24px',
}, },
]) ])
export const clearAll = style([
sprinkles({
color: 'textTertiary',
cursor: 'pointer',
fontWeight: 'semibold',
}),
{
':hover': {
color: vars.color.blue400,
},
},
])
...@@ -2,10 +2,29 @@ import { Box } from 'nft/components/Box' ...@@ -2,10 +2,29 @@ import { Box } from 'nft/components/Box'
import { Column, Row } from 'nft/components/Flex' import { Column, Row } from 'nft/components/Flex'
import { BagCloseIcon } from 'nft/components/icons' import { BagCloseIcon } from 'nft/components/icons'
import { roundAndPluralize } from 'nft/utils/roundAndPluralize' import { roundAndPluralize } from 'nft/utils/roundAndPluralize'
import { ThemedText } from 'theme' import styled from 'styled-components/macro'
import { ButtonText, ThemedText } from 'theme'
import * as styles from './BagHeader.css' import * as styles from './BagHeader.css'
const ClearButton = styled(ButtonText)`
color: ${({ theme }) => theme.textSecondary};
cursor: pointer;
font-weight: 600;
font-size: 14px;
line-height: 16px;
transition: 150ms ease color;
:hover {
color: ${({ theme }) => theme.accentActive};
}
`
const ControlRow = styled.div`
align-items: center;
display: flex;
flex-direction: row;
justify-content: space-between;
`
interface BagHeaderProps { interface BagHeaderProps {
numberOfAssets: number numberOfAssets: number
toggleBag: () => void toggleBag: () => void
...@@ -18,23 +37,15 @@ export const BagHeader = ({ numberOfAssets, toggleBag, resetFlow, isProfilePage ...@@ -18,23 +37,15 @@ export const BagHeader = ({ numberOfAssets, toggleBag, resetFlow, isProfilePage
<Column gap="4" paddingX="32" marginBottom="20"> <Column gap="4" paddingX="32" marginBottom="20">
<Row className={styles.header}> <Row className={styles.header}>
<ThemedText.HeadlineSmall>{isProfilePage ? 'Sell NFTs' : 'My bag'}</ThemedText.HeadlineSmall> <ThemedText.HeadlineSmall>{isProfilePage ? 'Sell NFTs' : 'My bag'}</ThemedText.HeadlineSmall>
<Box display="flex" padding="2" color="textSecondary" cursor="pointer" onClick={toggleBag}> <Box display="flex" padding="2" color="textPrimary" cursor="pointer" onClick={toggleBag}>
<BagCloseIcon /> <BagCloseIcon />
</Box> </Box>
</Row> </Row>
{numberOfAssets > 0 && ( {numberOfAssets > 0 && (
<Box fontSize="14" fontWeight="normal" style={{ lineHeight: '20px' }} color="textPrimary"> <ControlRow>
{roundAndPluralize(numberOfAssets, 'NFT')} ·{' '} <ThemedText.BodyPrimary>{roundAndPluralize(numberOfAssets, 'NFT')}</ThemedText.BodyPrimary>
<Box <ClearButton onClick={resetFlow}>Clear all</ClearButton>
as="span" </ControlRow>
className={styles.clearAll}
onClick={() => {
resetFlow()
}}
>
Clear all
</Box>
</Box>
)} )}
</Column> </Column>
) )
......
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