|
1 | 1 | import { useEffect, useState } from "react"
|
2 |
| -import type { IconType } from "react-icons/lib" |
3 | 2 | import { MdInfoOutline, MdWarning } from "react-icons/md"
|
4 |
| -import { chakra, Flex, HStack, Icon, Text } from "@chakra-ui/react" |
5 |
| - |
| 3 | +import type { IconType } from "react-icons/lib" |
6 | 4 | import { NULL_VALUE } from "@/lib/constants"
|
7 |
| - |
| 5 | +import { Flex } from "@/components/ui/flex" |
8 | 6 | import Tooltip, { type TooltipProps } from "../Tooltip"
|
9 | 7 |
|
| 8 | + |
10 | 9 | const initialContent = {
|
11 | 10 | contentValue: NULL_VALUE,
|
12 | 11 | tooltipIcon: MdInfoOutline,
|
@@ -39,20 +38,18 @@ const Stat = ({ tooltipProps, value, label, isError }: StatProps) => {
|
39 | 38 | }, [isError, value])
|
40 | 39 |
|
41 | 40 | return (
|
42 |
| - <Flex flexDirection="column-reverse"> |
43 |
| - <HStack lineHeight="initial" spacing="0.5" color="body.medium"> |
44 |
| - <Text as="span">{label}</Text> |
| 41 | + <Flex className="flex-col-reverse"> |
| 42 | + <div className="flex items-center space-x-2 leading-none text-body-medium"> |
| 43 | + <span>{label}</span> |
45 | 44 | {!!tooltipProps && (
|
46 | 45 | <Tooltip {...tooltipProps}>
|
47 |
| - <chakra.button display="flex" color="inherit"> |
48 |
| - <Icon as={content.tooltipIcon} /> |
49 |
| - </chakra.button> |
| 46 | + <button className="flex text-inherit"> |
| 47 | + <content.tooltipIcon className="h-4 w-4" /> |
| 48 | + </button> |
50 | 49 | </Tooltip>
|
51 | 50 | )}
|
52 |
| - </HStack> |
53 |
| - <Text as="span" size="5xl" fontWeight="bold"> |
54 |
| - {content.contentValue} |
55 |
| - </Text> |
| 51 | + </div> |
| 52 | + <span className="text-5xl font-bold">{content.contentValue}</span> |
56 | 53 | </Flex>
|
57 | 54 | )
|
58 | 55 | }
|
|
0 commit comments