Add headers to card component
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user