feature/IO-1113-Online-Dark-Mode - Initial Commit

This commit is contained in:
Dave Richer
2025-08-08 10:23:09 -04:00
parent 3737fe457f
commit 93e9e20f6f
35 changed files with 540 additions and 367 deletions

View File

@@ -5,26 +5,25 @@ const CustomTooltip = ({ active, payload, label }) => {
return (
<div
style={{
backgroundColor: "white",
border: "1px solid gray",
backgroundColor: "var(--tooltip-bg)",
border: "1px solid var(--tooltip-border)",
padding: "0.5rem"
}}
>
<p style={{ margin: "0" }}>{label}</p>
{payload.map((data, index) => {
const textColor = data.color || "var(--tooltip-text-fallback)";
if (data.dataKey === "sales" || data.dataKey === "accSales")
return (
<p style={{ margin: "10px 0", color: data.color }} key={index}>{`${data.name} : ${Dinero({
<p style={{ margin: "10px 0", color: textColor }} key={index}>{`${data.name} : ${Dinero({
amount: Math.round(data.value * 100)
}).toFormat()}`}</p>
);
return <p style={{ margin: "10px 0", color: data.color }} key={index}>{`${data.name} : ${data.value}`}</p>;
return <p style={{ margin: "10px 0", color: textColor }} key={index}>{`${data.name} : ${data.value}`}</p>;
})}
</div>
);
}
return null;
};