Tweak: again trying to restore chart sizing in 0.10.x (#4479)

This commit is contained in:
shamoon 2024-12-23 13:37:48 -08:00 committed by GitHub
parent 2d91b2b748
commit 94936ed09d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 25 additions and 11 deletions

View file

@ -42,10 +42,16 @@ export default function Component({ service }) {
}
data.splice(chart ? 5 : 1);
let headerYPosition = "top-4";
let listYPosition = "bottom-4";
if (chart) {
headerYPosition = "-top-6";
listYPosition = "-top-3";
}
return (
<Container chart={chart}>
<Block position="top-4 right-3 left-3">
<Block position={`${headerYPosition} right-3 left-3`}>
<div className="flex items-center text-xs">
<div className="grow" />
<div className="w-14 text-right italic">{t("resources.cpu")}</div>
@ -53,7 +59,7 @@ export default function Component({ service }) {
</div>
</Block>
<Block position="bottom-4 right-3 left-3">
<Block position={`${listYPosition} right-3 left-3`}>
<div className="pointer-events-none text-theme-900 dark:text-theme-200">
{data.map((item) => (
<div key={item.pid} className="text-[0.75rem] h-[0.8rem]">