2019-08-14 14:33:26 -04:00
|
|
|
import React, { Fragment } from 'react';
|
|
|
|
import { Link, NavLink } from 'react-router-dom';
|
|
|
|
|
2019-08-23 09:56:29 -04:00
|
|
|
import { BackIcon, EditIcon, ViewIcon }from '../components/icons';
|
2019-08-14 14:33:26 -04:00
|
|
|
|
2019-10-24 07:13:07 -04:00
|
|
|
interface ContainerHeaderProps {
|
|
|
|
cat?: string;
|
|
|
|
backLink: string;
|
|
|
|
title: string;
|
|
|
|
}
|
2019-08-14 14:33:26 -04:00
|
|
|
|
2019-10-24 07:13:07 -04:00
|
|
|
const ContainerHeader: React.FunctionComponent<ContainerHeaderProps> = (props) => (
|
|
|
|
<header className={`section-header view ${props.cat ? props.cat : ''} ${props.cat ? `background-${props.cat}` : ''}`}>
|
|
|
|
<Link className="icon-button back" to={props.backLink}>
|
2019-08-14 14:33:26 -04:00
|
|
|
<BackIcon />
|
|
|
|
</Link>
|
|
|
|
<h2 className="h2">{props.title}</h2>
|
|
|
|
<nav className="icon-buttons">
|
2019-10-24 07:13:07 -04:00
|
|
|
{props.children}
|
2019-08-14 14:33:26 -04:00
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
)
|
|
|
|
|
|
|
|
export default ContainerHeader;
|