2022-06-11 03:08:49 +00:00
|
|
|
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}>
|
2022-07-17 04:20:32 +00:00
|
|
|
<h1 className={style.viewContentTitle}>
|
2022-06-11 03:08:49 +00:00
|
|
|
{props.title}
|
2022-07-17 04:20:32 +00:00
|
|
|
</h1>
|
2022-06-11 03:08:49 +00:00
|
|
|
<div className={style.viewContentContent}>
|
|
|
|
{props.content}
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
)
|
|
|
|
})
|
2022-07-16 14:12:29 +00:00
|
|
|
ViewContent.displayName = "ViewContent"
|