colouring-montreal/app/src/frontend/building/container-header.tsx

25 lines
745 B
TypeScript
Raw Normal View History

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';
interface ContainerHeaderProps {
cat?: string;
backLink: string;
title: string;
}
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}>
<BackIcon />
</Link>
<h2 className="h2">{props.title}</h2>
<nav className="icon-buttons">
{props.children}
</nav>
</header>
)
export default ContainerHeader;