chore: wiki: add component Article
This commit is contained in:
1 parent
3c3a4e309a
commit
28dc1ce6b1
4 files changed
+72
-17
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { ReactNode } from "react";
|
||||
|
||||
interface ArticleProps {
|
||||
title: string;
|
||||
updatedAt?: string;
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
export default function Article({ title, updatedAt, children }: ArticleProps) {
|
||||
return (
|
||||
<article className="prose prose-invert prose-blue max-w-4xl mx-auto p-6 md:p-12 min-h-screen">
|
||||
<header className="mb-8 border-b border-zinc-800 pb-6">
|
||||
<h1 className="text-4xl font-extrabold text-white mb-2 m-0">{title}</h1>
|
||||
{updatedAt && (
|
||||
<p className="text-zinc-500 text-sm m-0">Zuletzt aktualisiert: {updatedAt}</p>
|
||||
)}
|
||||
</header>
|
||||
|
||||
{children}
|
||||
</article>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user