From 078f0bb223461528fe90c6fb6a761516182bf7c4 Mon Sep 17 00:00:00 2001 From: Karolina Kosiorowska Date: Fri, 8 Dec 2023 08:50:27 +0100 Subject: [PATCH] Use a `Card` component for overview elements --- .../components/Overview/PositionDetails.tsx | 43 ++++++++----------- dapp/src/components/Overview/Statistics.tsx | 11 +++-- .../Overview/TransactionHistory.tsx | 11 +++-- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/dapp/src/components/Overview/PositionDetails.tsx b/dapp/src/components/Overview/PositionDetails.tsx index 972db661f..e82d49620 100644 --- a/dapp/src/components/Overview/PositionDetails.tsx +++ b/dapp/src/components/Overview/PositionDetails.tsx @@ -2,42 +2,37 @@ import React from "react" import { Text, Button, - HStack, Tooltip, Icon, useColorModeValue, - Flex, + CardBody, + Card, + CardFooter, } from "@chakra-ui/react" import { BITCOIN, USD } from "../../constants" import { Info } from "../../static/icons" export default function PositionDetails() { return ( - - + + Your positions - - - 34.75 - {BITCOIN.symbol} - - - - 1.245.148,1 - {USD.symbol} - - {/* TODO: Add correct text for tooltip */} - - - - - - - + + 34.75 {BITCOIN.symbol} + + + 1.245.148,1 {USD.symbol} + {/* TODO: Add correct text for tooltip */} + + + + + + {/* TODO: Handle click actions */} - - + + ) } diff --git a/dapp/src/components/Overview/Statistics.tsx b/dapp/src/components/Overview/Statistics.tsx index b0c2dc0d6..bad05e4da 100644 --- a/dapp/src/components/Overview/Statistics.tsx +++ b/dapp/src/components/Overview/Statistics.tsx @@ -1,10 +1,13 @@ import React from "react" -import { Text, Box } from "@chakra-ui/react" +import { CardBody, Card } from "@chakra-ui/react" +import { TextMd } from "../Typography" export default function Statistics() { return ( - - Pool stats - + + + Pool stats + + ) } diff --git a/dapp/src/components/Overview/TransactionHistory.tsx b/dapp/src/components/Overview/TransactionHistory.tsx index 312233938..b8c0da7fd 100644 --- a/dapp/src/components/Overview/TransactionHistory.tsx +++ b/dapp/src/components/Overview/TransactionHistory.tsx @@ -1,10 +1,13 @@ import React from "react" -import { Text, Box } from "@chakra-ui/react" +import { CardBody, Card } from "@chakra-ui/react" +import { TextMd } from "../Typography" export default function TransactionHistory() { return ( - - Transaction history - + + + Transaction history + + ) }