// Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import classNames from 'classnames'; import { bemGenerator } from './util'; export type Props = { actions?: React.ReactNode; borderless?: boolean; centerTitle?: boolean; title?: string; }; const bem = bemGenerator('module-conversation-details-panel-section'); const borderlessClass = bem('root', 'borderless'); export const PanelSection: React.ComponentType = ({ actions, borderless, centerTitle, children, title, }) => (
{(title || actions) && (
{title &&
{title}
} {actions &&
{actions}
}
)}
{children}
);