2025-09-26 23:06:57 +03:00
|
|
|
import { ComponentChildren } from "preact";
|
|
|
|
|
|
|
|
|
|
interface CardProps {
|
|
|
|
|
title: string;
|
2025-09-26 23:16:06 +03:00
|
|
|
imageUrl?: string;
|
2025-09-27 00:46:51 +03:00
|
|
|
className?: string;
|
2025-09-26 23:06:57 +03:00
|
|
|
children: ComponentChildren;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-27 00:46:51 +03:00
|
|
|
export default function Card({ title, children, imageUrl, className }: CardProps) {
|
2025-09-26 23:06:57 +03:00
|
|
|
return (
|
2025-09-27 00:46:51 +03:00
|
|
|
<div className={`card ${className}`}>
|
2025-09-26 23:16:06 +03:00
|
|
|
{imageUrl && <img class="image" src={imageUrl} />}
|
2025-09-26 23:52:58 +03:00
|
|
|
|
|
|
|
|
<div className="card-content">
|
|
|
|
|
<h3>{title}</h3>
|
2025-09-26 23:06:57 +03:00
|
|
|
{children}
|
2025-09-26 23:52:58 +03:00
|
|
|
</div>
|
2025-09-26 23:06:57 +03:00
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|