You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
447 B
16 lines
447 B
export default function Tooltip({ active, payload, formatter }) {
|
|
if (active && payload && payload.length) {
|
|
return (
|
|
<div className="bg-theme-800/80 rounded-md text-theme-200 px-2 py-0">
|
|
{payload.map((pld, id) => (
|
|
<div key={Math.random()} className="first-of-type:pt-0 pt-0.5">
|
|
<div>{formatter(pld.value)} {payload[id].name}</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return null;
|
|
};
|