mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
support array of disks, for disk resource widget
This commit is contained in:
parent
ed65c89516
commit
6e01a743df
@ -8,7 +8,11 @@ export default function Resources({ options }) {
|
|||||||
<div className="flex flex-row space-x-4 self-center">
|
<div className="flex flex-row space-x-4 self-center">
|
||||||
{options.cpu && <Cpu />}
|
{options.cpu && <Cpu />}
|
||||||
{options.memory && <Memory />}
|
{options.memory && <Memory />}
|
||||||
{options.disk && <Disk options={options} />}
|
{Array.isArray(options.disk) ? (
|
||||||
|
options.disk.map((disk) => <Disk key={disk} options={{ disk }} />)
|
||||||
|
) : (
|
||||||
|
<Disk options={options} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{options.label && (
|
{options.label && (
|
||||||
<div className="ml-6 pt-1 text-center text-theme-800 dark:text-theme-200 text-xs">{options.label}</div>
|
<div className="ml-6 pt-1 text-center text-theme-800 dark:text-theme-200 text-xs">{options.label}</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user