Files
Trilium/apps/website2/src/components/Card.tsx

20 lines
468 B
TypeScript
Raw Normal View History

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-26 23:06:57 +03:00
children: ComponentChildren;
}
2025-09-26 23:16:06 +03:00
export default function Card({ title, children, imageUrl }: CardProps) {
2025-09-26 23:06:57 +03:00
return (
<div className="card">
2025-09-26 23:16:06 +03:00
{imageUrl && <img class="image" src={imageUrl} />}
2025-09-26 23:06:57 +03:00
<p>
<span class="text-big">{title}</span><br />
{children}
</p>
</div>
)
}