Skip to content

Commit

Permalink
fix: account pie tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 committed Sep 13, 2023
1 parent c6f735c commit d69e6a4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions deploy-web/src/components/home/YourAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,19 @@ const BalancePie: React.FunctionComponent<BalancePieProps> = ({ label, data, get
return `${udenomToDenom(value, 2)} ${label}`;
}}
tooltip={value => (
<Box sx={{ backgroundColor: theme.palette.grey[900], padding: ".5rem 1rem", borderRadius: ".5rem" }}>
{value.datum.label}: {value.datum.formattedValue}
<Box
sx={{
backgroundColor: theme.palette.mode === "dark" ? theme.palette.grey[900] : theme.palette.grey[300],
padding: ".25rem .5rem",
borderRadius: ".25rem",
display: "flex",
alignItems: "center"
}}
>
<Box sx={{ width: ".5rem", height: ".5rem", backgroundColor: value.datum.color }} />
<Box sx={{ marginLeft: ".5rem" }}>
{value.datum.label}: {value.datum.formattedValue}
</Box>
</Box>
)}
enableArcLinkLabels={false}
Expand Down

0 comments on commit d69e6a4

Please sign in to comment.