[#54] kártya komponens #14

Merged
Donat merged 1 commits from task/54-k-rtya-komponens into main 2025-07-09 11:59:29 +02:00
Showing only changes of commit 724162b9c9 - Show all commits
@@ -0,0 +1,19 @@
import React from "react";
export default function Card({ title, children, onClose }) {
return (
<div className="relative bg-white rounded-xl shadow-lg p-6 w-[400px] h-[300px]">
<button
onClick={onClose}
className="absolute top-2 right-2 text-gray-500 hover:text-black text-xl font-bold leading-none"
aria-label="Close"
>
×
</button>
{title && <h2 className="text-xl font-semibold mb-4">{title}</h2>}
<div className="overflow-auto h-[calc(100%-3.5rem)]">{children}</div>
</div>
);
}