mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
25 lines
640 B
JavaScript
25 lines
640 B
JavaScript
import Link from 'next/link';
|
|
import classNames from 'classnames';
|
|
import { Button, Icon } from 'react-basics';
|
|
import styles from './PageHeader.module.css';
|
|
|
|
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>
|
|
);
|
|
}
|