Commit 627af508 authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

fix: total and 'my bag' text style update (#4994)

parent a955b373
...@@ -2,11 +2,12 @@ import { BigNumber } from '@ethersproject/bignumber' ...@@ -2,11 +2,12 @@ import { BigNumber } from '@ethersproject/bignumber'
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, headlineSmall } from 'nft/css/common.css' import { bodySmall } from 'nft/css/common.css'
import { BagStatus } from 'nft/types' import { BagStatus } from 'nft/types'
import { ethNumberStandardFormatter, formatWeiToDecimal } from 'nft/utils' 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'
import { ThemedText } from 'theme'
import * as styles from './BagFooter.css' import * as styles from './BagFooter.css'
...@@ -62,11 +63,13 @@ export const BagFooter = ({ ...@@ -62,11 +63,13 @@ export const BagFooter = ({
> >
<Column gap="4" paddingTop="8" paddingBottom="20"> <Column gap="4" paddingTop="8" paddingBottom="20">
<Row justifyContent="space-between"> <Row justifyContent="space-between">
<Box fontWeight="semibold" className={headlineSmall}> <Box>
Total <ThemedText.HeadlineSmall>Total</ThemedText.HeadlineSmall>
</Box> </Box>
<Box fontWeight="semibold" className={headlineSmall}> <Box>
{`${formatWeiToDecimal(totalEthPrice.toString())} ETH`} <ThemedText.HeadlineSmall>
{formatWeiToDecimal(totalEthPrice.toString())}&nbsp;ETH
</ThemedText.HeadlineSmall>
</Box> </Box>
</Row> </Row>
<Row justifyContent="flex-end" color="textSecondary" className={bodySmall}> <Row justifyContent="flex-end" color="textSecondary" className={bodySmall}>
......
...@@ -2,6 +2,7 @@ import { Box } from 'nft/components/Box' ...@@ -2,6 +2,7 @@ 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 * as styles from './BagHeader.css' import * as styles from './BagHeader.css'
...@@ -16,7 +17,7 @@ export const BagHeader = ({ numberOfAssets, toggleBag, resetFlow, isProfilePage ...@@ -16,7 +17,7 @@ export const BagHeader = ({ numberOfAssets, toggleBag, resetFlow, isProfilePage
return ( return (
<Column gap="4" paddingX="32" marginBottom="20"> <Column gap="4" paddingX="32" marginBottom="20">
<Row className={styles.header}> <Row className={styles.header}>
{isProfilePage ? 'Sell NFTs' : 'My bag'} <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="textSecondary" cursor="pointer" onClick={toggleBag}>
<BagCloseIcon /> <BagCloseIcon />
</Box> </Box>
......
...@@ -243,15 +243,36 @@ const TextWrapper = styled(Text)<{ color: keyof AllColors }>` ...@@ -243,15 +243,36 @@ const TextWrapper = styled(Text)<{ color: keyof AllColors }>`
* Preset styles of the Rebass Text component * Preset styles of the Rebass Text component
*/ */
export const ThemedText = { export const ThemedText = {
BodyPrimary(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={16} color={'textPrimary'} {...props} />
},
BodySecondary(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={16} color={'textSecondary'} {...props} />
},
HeadlineSmall(props: TextProps) {
return <TextWrapper fontWeight={600} fontSize={20} lineHeight="28px" color={'textPrimary'} {...props} />
},
LargeHeader(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={36} color={'textPrimary'} {...props} />
},
Link(props: TextProps) {
return <TextWrapper fontWeight={600} fontSize={14} color={'accentAction'} {...props} />
},
MediumHeader(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={20} color={'textPrimary'} {...props} />
},
SubHeader(props: TextProps) {
return <TextWrapper fontWeight={600} fontSize={16} color={'textPrimary'} {...props} />
},
SubHeaderSmall(props: TextProps) {
return <TextWrapper fontWeight={500} fontSize={14} color={'textSecondary'} {...props} />
},
DeprecatedMain(props: TextProps) { DeprecatedMain(props: TextProps) {
return <TextWrapper fontWeight={500} color={'deprecated_text2'} {...props} /> return <TextWrapper fontWeight={500} color={'deprecated_text2'} {...props} />
}, },
DeprecatedLink(props: TextProps) { DeprecatedLink(props: TextProps) {
return <TextWrapper fontWeight={500} color={'deprecated_primary1'} {...props} /> return <TextWrapper fontWeight={500} color={'deprecated_primary1'} {...props} />
}, },
Link(props: TextProps) {
return <TextWrapper fontWeight={600} fontSize={14} color={'accentAction'} {...props} />
},
DeprecatedLabel(props: TextProps) { DeprecatedLabel(props: TextProps) {
return <TextWrapper fontWeight={600} color={'deprecated_text1'} {...props} /> return <TextWrapper fontWeight={600} color={'deprecated_text1'} {...props} />
}, },
...@@ -264,33 +285,15 @@ export const ThemedText = { ...@@ -264,33 +285,15 @@ export const ThemedText = {
DeprecatedBody(props: TextProps) { DeprecatedBody(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={16} color={'deprecated_text1'} {...props} /> return <TextWrapper fontWeight={400} fontSize={16} color={'deprecated_text1'} {...props} />
}, },
BodySecondary(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={16} color={'textSecondary'} {...props} />
},
BodyPrimary(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={16} color={'textPrimary'} {...props} />
},
DeprecatedLargeHeader(props: TextProps) { DeprecatedLargeHeader(props: TextProps) {
return <TextWrapper fontWeight={600} fontSize={24} {...props} /> return <TextWrapper fontWeight={600} fontSize={24} {...props} />
}, },
LargeHeader(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={36} color={'textPrimary'} {...props} />
},
DeprecatedMediumHeader(props: TextProps) { DeprecatedMediumHeader(props: TextProps) {
return <TextWrapper fontWeight={500} fontSize={20} {...props} /> return <TextWrapper fontWeight={500} fontSize={20} {...props} />
}, },
MediumHeader(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={20} color={'textPrimary'} {...props} />
},
DeprecatedSubHeader(props: TextProps) { DeprecatedSubHeader(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={14} {...props} /> return <TextWrapper fontWeight={400} fontSize={14} {...props} />
}, },
SubHeader(props: TextProps) {
return <TextWrapper fontWeight={600} fontSize={16} color={'textPrimary'} {...props} />
},
SubHeaderSmall(props: TextProps) {
return <TextWrapper fontWeight={500} fontSize={14} color={'textSecondary'} {...props} />
},
DeprecatedSmall(props: TextProps) { DeprecatedSmall(props: TextProps) {
return <TextWrapper fontWeight={500} fontSize={11} {...props} /> return <TextWrapper fontWeight={500} fontSize={11} {...props} />
}, },
......
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