[Metadata][m]: Add new component Metadata to display parsed Frontmatter
This commit is contained in:
18
examples/data-literate/components/Metadata.js
Normal file
18
examples/data-literate/components/Metadata.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
|
||||||
|
export default function MetaData({ title, author, description }) {
|
||||||
|
return (
|
||||||
|
<header>
|
||||||
|
<div className="mb-6">
|
||||||
|
<h1>{title}</h1>
|
||||||
|
{author && (
|
||||||
|
<div className="-mt-6"><p className="opacity-60 pl-1">{author}</p></div>
|
||||||
|
)}
|
||||||
|
{description && (
|
||||||
|
<p className="description">{description}</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user