mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Add optional boxed styling and error component to information widgets
Signed-off-by: Denis Papec <denis.papec@gmail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import classNames from "classnames";
|
||||
|
||||
import Disk from "./disk";
|
||||
import Cpu from "./cpu";
|
||||
import Memory from "./memory";
|
||||
@@ -7,7 +9,10 @@ import Uptime from "./uptime";
|
||||
export default function Resources({ 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={classNames(
|
||||
"flex flex-col max-w:full sm:basis-auto self-center grow-0 flex-wrap",
|
||||
options?.styleBoxed === true && " ml-4 mt-2 m:mb-0 rounded-md shadow-md shadow-theme-900/10 dark:shadow-theme-900/20 bg-theme-100/20 dark:bg-white/5 p-3",
|
||||
)}>
|
||||
<div className="flex flex-row self-center flex-wrap justify-between">
|
||||
{options.cpu && <Cpu expanded={expanded} />}
|
||||
{options.memory && <Memory expanded={expanded} />}
|
||||
|
||||
Reference in New Issue
Block a user