blob: ccfde4a0f5b5a18b77f957d28c92dc38be99f88c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import React, { FC } from 'react';
import PathCrumbs from "../../components/PathCrumbs";
import Viewport from "../../components/ViewPort";
import styles from './default.module.scss';
import clsx from 'clsx';
export type DefaultPageProps = {
className?: string;
path?: string;
lastUpdated?: string;
children?: React.ReactChild;
};
const LastUpdatedDate : FC<{ children: React.ReactNode }> = ({children}) => (
<span className={styles.date}><b>Last Updated: </b>{children}</span>
)
const DefaultPage : FC<DefaultPageProps> = ({className, lastUpdated, children, path, ...props}) => (
<Viewport
className={clsx(styles.viewportOverrides, className)}
>
{path !== undefined ? <PathCrumbs path={path!} /> : undefined}
{lastUpdated ? <LastUpdatedDate>{lastUpdated}</LastUpdatedDate> : undefined}
{children}
</Viewport>
);
export default DefaultPage;
|