19 lines
391 B
TypeScript
19 lines
391 B
TypeScript
import { ReactNode } from "react";
|
|
|
|
interface Props {
|
|
title: string;
|
|
author: string;
|
|
children: ReactNode;
|
|
}
|
|
|
|
const Article = ({ title, author, children }: Props) => {
|
|
return (
|
|
<article>
|
|
<h1 className="text-4xl font-bold font-cormorant m-5">{title}</h1>
|
|
<h6 className="text-lg italic m-5">{author}</h6>
|
|
{children}
|
|
</article>
|
|
);
|
|
};
|
|
|
|
export default Article;
|