Add headers to card component

This commit is contained in:
2025-08-30 22:04:30 +02:00
parent 9dbb0d6b4d
commit 0347ead200
4 changed files with 37 additions and 25 deletions

View File

@@ -1,11 +1,26 @@
import CardHeader from "@/components/CardHeader/CardHeader";
import style from "./style.module.css";
export default function Card({
active,
icon,
name,
children,
active = false,
header = true,
}: {
icon: string;
name: string;
active?: boolean;
header?: boolean;
children: React.ReactNode;
}) {
return <div className={style.card}>{children}</div>;
return (
<div className={style.card}>
{header && (
<CardHeader icon={icon} content={name} isActive={active} />
)}
{children}
</div>
);
}

View File

@@ -1,6 +1,7 @@
.card {
display: flex;
flex-direction: column;
justify-content: flex-start;
justify-content: center;
background-color: #c0c0c0;
border-top: 2px solid white;
border-left: 2px solid white;
@@ -8,7 +9,3 @@
border-right: 2px solid #828282;
margin: 10px;
}
.cardContent {
padding: 1px 100px 30px 100px;
}