2023-01-19 00:05:39 +01:00
|
|
|
import React from 'react';
|
2022-12-27 01:57:59 +01:00
|
|
|
import Link from 'next/link';
|
2020-09-22 06:34:55 +02:00
|
|
|
import classNames from 'classnames';
|
2022-12-27 01:57:59 +01:00
|
|
|
import { Button, Icon } from 'react-basics';
|
2020-08-07 09:24:01 +02:00
|
|
|
import styles from './PageHeader.module.css';
|
|
|
|
|
2022-12-27 01:57:59 +01:00
|
|
|
export default function PageHeader({ title, backUrl, children, className, style }) {
|
|
|
|
return (
|
|
|
|
<div className={classNames(styles.header, className)} style={style}>
|
|
|
|
<div className={styles.title}>
|
|
|
|
{backUrl && (
|
|
|
|
<Link href={backUrl}>
|
|
|
|
<a>
|
|
|
|
<Button>
|
|
|
|
<Icon icon="arrow-left" /> Back
|
|
|
|
</Button>
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
)}
|
|
|
|
{title}
|
|
|
|
</div>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
2020-08-07 09:24:01 +02:00
|
|
|
}
|