2018-06-14 12:48:30 -06:00
|
|
|
import * as React from "react";
|
|
|
|
import { Col, ToolTip } from ".";
|
2019-04-02 13:59:37 -06:00
|
|
|
import { t } from "../i18next_wrapper";
|
2019-12-26 13:20:10 -07:00
|
|
|
import { ErrorBoundary } from "../error_boundary";
|
2019-04-02 13:59:37 -06:00
|
|
|
|
2018-06-14 12:48:30 -06:00
|
|
|
interface LeftPanelProps {
|
|
|
|
children?: React.ReactNode;
|
|
|
|
className: string;
|
|
|
|
title: string;
|
2019-06-21 15:43:46 -06:00
|
|
|
helpText?: string;
|
2018-06-14 12:48:30 -06:00
|
|
|
width?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function LeftPanel(props: LeftPanelProps) {
|
|
|
|
return <Col sm={props.width || 3}>
|
|
|
|
<div className={props.className}>
|
|
|
|
<h3>
|
|
|
|
<i>{t(props.title)}</i>
|
|
|
|
</h3>
|
2019-06-21 15:43:46 -06:00
|
|
|
{props.helpText && <ToolTip helpText={props.helpText} />}
|
2019-12-26 13:20:10 -07:00
|
|
|
<ErrorBoundary>
|
|
|
|
{props.children}
|
|
|
|
</ErrorBoundary>
|
2018-06-14 12:48:30 -06:00
|
|
|
</div>
|
|
|
|
</Col>;
|
|
|
|
}
|