Add cputemp to resources widget

This commit is contained in:
shamoon 2023-03-05 14:11:43 -08:00
parent d4a3ba84e9
commit f46addf20a
6 changed files with 101 additions and 2 deletions

View file

@ -1,9 +1,10 @@
import Disk from "./disk";
import Cpu from "./cpu";
import Memory from "./memory";
import CpuTemp from "./cputemp";
export default function Resources({ options }) {
const { expanded } = options;
const { expanded, units } = options;
return (
<div className="flex flex-col max-w:full sm:basis-auto self-center grow-0 flex-wrap">
<div className="flex flex-row self-center flex-wrap justify-between">
@ -12,6 +13,7 @@ export default function Resources({ options }) {
{Array.isArray(options.disk)
? options.disk.map((disk) => <Disk key={disk} options={{ disk }} expanded={expanded} />)
: options.disk && <Disk options={options} expanded={expanded} />}
{options.cputemp && <CpuTemp expanded={expanded} units={units} />}
</div>
{options.label && (
<div className="ml-6 pt-1 text-center text-theme-800 dark:text-theme-200 text-xs">{options.label}</div>