UI fixes for conversation details screen

This commit is contained in:
Josh Perez 2021-02-01 17:57:42 -05:00 committed by GitHub
parent ddebbf8121
commit 267ae80442
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 134 additions and 51 deletions

View file

@ -9,7 +9,7 @@ export type Props = {
alwaysShowActions?: boolean;
className?: string;
icon?: React.ReactNode;
label: string;
label: string | React.ReactNode;
info?: string;
right?: string | React.ReactNode;
actions?: React.ReactNode;
@ -30,15 +30,15 @@ export const PanelRow: React.ComponentType<Props> = ({
}) => {
const content = (
<>
{icon && <div className={bem('icon')}>{icon}</div>}
{icon !== undefined ? <div className={bem('icon')}>{icon}</div> : null}
<div className={bem('label')}>
<div>{label}</div>
{info && <div className={bem('info')}>{info}</div>}
{info !== undefined ? <div className={bem('info')}>{info}</div> : null}
</div>
{right && <div className={bem('right')}>{right}</div>}
{actions && (
{right !== undefined ? <div className={bem('right')}>{right}</div> : null}
{actions !== undefined ? (
<div className={alwaysShowActions ? '' : bem('actions')}>{actions}</div>
)}
) : null}
</>
);