diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx
index 91f1053..90918e6 100644
--- a/src/components/Card/Card.tsx
+++ b/src/components/Card/Card.tsx
@@ -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
{children}
;
+ return (
+
+ {header && (
+
+ )}
+ {children}
+
+ );
}
diff --git a/src/components/Card/style.module.css b/src/components/Card/style.module.css
index 773bd02..7fe629c 100644
--- a/src/components/Card/style.module.css
+++ b/src/components/Card/style.module.css
@@ -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;
-}
diff --git a/src/components/CardHeader/CardHeader.tsx b/src/components/CardHeader/CardHeader.tsx
index d04600f..b954024 100644
--- a/src/components/CardHeader/CardHeader.tsx
+++ b/src/components/CardHeader/CardHeader.tsx
@@ -1,12 +1,17 @@
+import classNames from "classnames/bind";
+
import style from "./style.module.css";
-export default function CardHeader({ icon, content, active = false }) {
- let containerClass = style.container;
- if (active) {
- containerClass += ` ${style.active}`;
- }
+const styles = {
+ container: style.container,
+ active: style.active,
+};
+
+const cx = classNames.bind(styles);
+
+export default function CardHeader({ icon, content, isActive = false }) {
return (
-
+
{icon}
{content}
diff --git a/src/components/Dashboard/Dashboard.tsx b/src/components/Dashboard/Dashboard.tsx
index 9aa5392..992b093 100644
--- a/src/components/Dashboard/Dashboard.tsx
+++ b/src/components/Dashboard/Dashboard.tsx
@@ -5,13 +5,13 @@ import {
CardColumn,
CardRow,
} from "@/components/CardContainers/CardContainers";
-import CardHeader from "@/components/CardHeader/CardHeader";
import Datetime from "@/components/Datetime/Datetime";
import Flatastic from "@/components/Flatastic/Flatastic";
import Footer from "@/components/Footer/Footer";
import Terminal from "@/components/Terminal/Terminal";
import Timetable from "@/components/Timetable/Timetable";
-import Weather from "../Weather/Weather";
+import Weather from "@/components/Weather/Weather";
+
import style from "./style.module.css";
export default function Dashboard() {
@@ -43,30 +43,25 @@ export default function Dashboard() {
return (
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+