Skip to content

Commit 0e0157f

Browse files
committed
chore: convert GridItem to Chakra
1 parent 5f21602 commit 0e0157f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/components/StatsBoxGrid.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import axios from "axios"
55
import { kebabCase } from "lodash"
66
import { AreaChart, ResponsiveContainer, Area, XAxis } from "recharts"
77

8-
import { Grid, Icon } from "@chakra-ui/react"
8+
import { Grid, Icon, VStack, Box as ChakraBox } from "@chakra-ui/react"
99
import { MdInfoOutline } from "react-icons/md"
1010

1111
import Translation from "./Translation"
@@ -157,22 +157,22 @@ const GridItem: React.FC<IGridItemProps> = ({ metric, dir }) => {
157157
) : isLoading ? (
158158
<StatLoadingMessage />
159159
) : (
160-
// @TODO: Convert StatRow to Chakra
161-
<StatRow>
162-
<span>
160+
<VStack>
161+
<ChakraBox>
163162
{state.value}{" "}
164163
<Tooltip content={tooltipContent(metric)}>
165-
{/* @TODO: continue migrate Icon
166-
167-
https://github.com/chakra-ui/chakra-ui/issues/363
168-
*/}
169164
<Icon
170165
as={MdInfoOutline}
171-
sx={{ "svg:hover": { fill: "text" } }}
166+
width="24px"
167+
height="24px"
168+
_hover={{ fill: "primary" }}
169+
_active={{ fill: "primary" }}
170+
_focus={{ fill: "primary" }}
171+
mr="0.5rem"
172172
></Icon>
173173
</Tooltip>
174-
</span>
175-
</StatRow>
174+
</ChakraBox>
175+
</VStack>
176176
)
177177

178178
// Returns either 90 or 30-day data range depending on `range` selection

0 commit comments

Comments
 (0)