From 36225fbd0fa403c9fab29e7ed8790774e4ff0864 Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:22:36 -0600 Subject: [PATCH] final tweaks --- src/pages/Markets/components/AssetCard.tsx | 37 +++++++---- .../Markets/components/CardWithSparkline.tsx | 64 +++++++++---------- src/pages/Markets/components/LpCard.tsx | 28 ++++---- src/pages/Markets/components/MarketsRow.tsx | 2 +- 4 files changed, 70 insertions(+), 61 deletions(-) diff --git a/src/pages/Markets/components/AssetCard.tsx b/src/pages/Markets/components/AssetCard.tsx index 4964dce2a8e..667291cbd8b 100644 --- a/src/pages/Markets/components/AssetCard.tsx +++ b/src/pages/Markets/components/AssetCard.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Card, CardBody, Flex, Text } from '@chakra-ui/react' +import { Box, Button, Card, CardBody, Flex, Text, Tooltip } from '@chakra-ui/react' import type { AssetId } from '@shapeshiftoss/caip' import { useCallback } from 'react' import { Amount } from 'components/Amount/Amount' @@ -28,18 +28,26 @@ export const AssetCard: React.FC = ({ assetId, onClick }) => { as={Flex} flexDirection='column' justifyContent='space-between' - py={4} - px={4} + py={5} + px={5} width='100%' height='100%' > - + - - {asset.name} - - + + + {asset.name} + + + {asset.symbol} @@ -47,13 +55,16 @@ export const AssetCard: React.FC = ({ assetId, onClick }) => { - - /> + /> + diff --git a/src/pages/Markets/components/CardWithSparkline.tsx b/src/pages/Markets/components/CardWithSparkline.tsx index 5e8406dda5f..70d0f14bd19 100644 --- a/src/pages/Markets/components/CardWithSparkline.tsx +++ b/src/pages/Markets/components/CardWithSparkline.tsx @@ -40,57 +40,51 @@ export const CardWithSparkline: React.FC<{ as={Flex} flexDirection='column' justifyContent='space-between' - py={6} + py={5} width='100%' height='100%' > - - - - - - - {asset.name} - - - {asset.symbol} - - - - - - - + + + + + + {asset.name} + + + {asset.symbol} + + + - + + + + - - + - - + innerHtml={markdownLinkToHTML(asset.description || '')} + /> - + diff --git a/src/pages/Markets/components/LpCard.tsx b/src/pages/Markets/components/LpCard.tsx index 364cc7ab27f..f02b7e73e69 100644 --- a/src/pages/Markets/components/LpCard.tsx +++ b/src/pages/Markets/components/LpCard.tsx @@ -46,13 +46,14 @@ export const LpCard: React.FC = ({ assetId, apy, volume24H, onClick as={Flex} flexDirection='column' justifyContent='space-between' - p={2} + py={5} + px={5} width='100%' height='100%' > - - - + + + = ({ assetId, apy, volume24H, onClick textOverflow='ellipsis' overflow='hidden' width='100%' + mb={1} > {asset.name} @@ -68,7 +70,7 @@ export const LpCard: React.FC = ({ assetId, apy, volume24H, onClick = ({ assetId, apy, volume24H, onClick - + - + {bnOrZero(volume24H).isPositive() ? ( - + ) : ( - + N/A )} diff --git a/src/pages/Markets/components/MarketsRow.tsx b/src/pages/Markets/components/MarketsRow.tsx index 883f3718cdb..c6bb600476c 100644 --- a/src/pages/Markets/components/MarketsRow.tsx +++ b/src/pages/Markets/components/MarketsRow.tsx @@ -73,7 +73,7 @@ export const MarketsRow: React.FC = ({ } return ( - + {subtitle} )