colouring-montreal/app/src/frontend/sidebar.tsx
Maciej Ziarkowski c92c4cded3 Setup TS build (failing), rename files to .ts/.tsx
The TypeScript build currently runs but fails for a number of files.
This commit only contains rename operations on the source files.
2019-08-09 15:44:11 +01:00

31 lines
762 B
TypeScript

import React from 'react';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import './sidebar.css';
import { BackIcon } from './icons';
const Sidebar = (props) => (
<div id="legend" className="info-container">
<header className="sidebar-header">
{
props.back?
<Link className="icon-button back" to={props.back}>
<BackIcon />
</Link>
: null
}
<h2 className="h2">{props.title}</h2>
</header>
{props.children}
</div>
);
Sidebar.propTypes = {
back: PropTypes.string,
title: PropTypes.string.isRequired,
children: PropTypes.node
}
export default Sidebar;