mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
22 lines
521 B
TypeScript
22 lines
521 B
TypeScript
import { ComponentChildren } from "preact";
|
|
|
|
interface CardProps {
|
|
title: string;
|
|
imageUrl?: string;
|
|
className?: string;
|
|
children: ComponentChildren;
|
|
}
|
|
|
|
export default function Card({ title, children, imageUrl, className }: CardProps) {
|
|
return (
|
|
<div className={`card ${className}`}>
|
|
{imageUrl && <img class="image" src={imageUrl} />}
|
|
|
|
<div className="card-content">
|
|
<h3>{title}</h3>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|