colouring-montreal/app/src/frontend/sidebar.js

24 lines
600 B
JavaScript
Raw Normal View History

2018-09-11 15:59:37 -04:00
import React from 'react';
2018-10-01 12:20:25 -04:00
import { Link } from 'react-router-dom';
2018-09-11 15:59:37 -04:00
import './sidebar.css';
2018-10-01 12:20:25 -04:00
import { BackIcon } from './icons';
2018-09-11 15:59:37 -04:00
const Sidebar = (props) => (
<div id="legend" className="info-container">
2018-10-01 12:20:25 -04:00
<header className="sidebar-header">
{
props.back?
<Link className="icon-button back" to={props.back}>
<BackIcon />
</Link>
: null
}
<h2 className="h2">{props.title}</h2>
</header>
2018-09-11 15:59:37 -04:00
{props.children}
</div>
);
export default Sidebar;