import * as React from 'react'; import classNames from 'classnames'; import {Icon} from 'superdesk-ui-framework/react'; interface IProps { children?: React.ReactNode; title?: string; borderBottom?: boolean; darkBlueGrey?: boolean; borderB?: boolean; onClose?(): void; } export class PanelHeader extends React.PureComponent { render() { const classes = classNames( 'side-panel__header', { 'side-panel__header--border-bottom': this.props.borderBottom, 'side-panel__header--dark-blue-grey': this.props.darkBlueGrey, 'side-panel__header--border-b': this.props.borderB, }, ); return (
{this.props.onClose && ( )} {!this.props.title ? null : (

{this.props.title}

)} {this.props.children}
); } }