mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-23 15:14:23 +00:00
25 lines
No EOL
641 B
TypeScript
25 lines
No EOL
641 B
TypeScript
import { memo, ReactNode } from "react"
|
|
import style from "./content.module.css"
|
|
|
|
|
|
export type ViewContentProps = {
|
|
title: ReactNode
|
|
content: ReactNode
|
|
}
|
|
|
|
/**
|
|
* A view which displays a title and below it some miscellaneous text content.
|
|
*/
|
|
export const ViewContent = memo((props: ViewContentProps) => {
|
|
return (
|
|
<main className={style.viewContent}>
|
|
<h2 className={style.viewContentTitle}>
|
|
{props.title}
|
|
</h2>
|
|
<div className={style.viewContentContent}>
|
|
{props.content}
|
|
</div>
|
|
</main>
|
|
)
|
|
})
|
|
ViewContent.displayName = "ViewContent" |