1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-23 07:04:22 +00:00
festa/components/generic/views/landing.tsx

34 lines
928 B
TypeScript
Raw Normal View History

2022-06-11 03:08:49 +00:00
import { memo, ReactNode } from "react"
import style from "./landing.module.css"
export type ViewLandingProps = {
title: ReactNode
subtitle: ReactNode
actions: ReactNode
}
/**
* A view which displays a *really* big title and subtitle, with some actions the user can take below.
*
* Intended for the root / landing page of the app.
*/
export const ViewLanding = memo((props: ViewLandingProps) => {
return (
<main className={style.viewLanding}>
<hgroup className={style.viewLandingTitles}>
<h1 className={style.viewLandingTitlesTitle}>
{props.title}
</h1>
<h2 className={style.viewLandingTitlesSubtitle}>
{props.subtitle}
</h2>
</hgroup>
<div className={style.viewLandingActions}>
{props.actions}
</div>
</main>
)
})