Conversation Colors

This commit is contained in:
Josh Perez 2021-05-28 12:15:17 -04:00 committed by GitHub
parent b63d8e908c
commit 28f016ce48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
128 changed files with 3997 additions and 1207 deletions

View file

@ -7,6 +7,7 @@ import { createPortal } from 'react-dom';
import { Theme, themeClassName } from '../util/theme';
export type PropsType = {
readonly noMouseClose?: boolean;
readonly onEscape?: () => unknown;
readonly onClose: () => unknown;
readonly children: React.ReactElement;
@ -14,7 +15,7 @@ export type PropsType = {
};
export const ModalHost = React.memo(
({ onEscape, onClose, children, theme }: PropsType) => {
({ onEscape, onClose, children, noMouseClose, theme }: PropsType) => {
const [root, setRoot] = React.useState<HTMLElement | null>(null);
useEffect(() => {
@ -67,7 +68,7 @@ export const ModalHost = React.memo(
'module-modal-host__overlay',
theme ? themeClassName(theme) : undefined
)}
onClick={handleCancel}
onClick={noMouseClose ? undefined : handleCancel}
>
{children}
</div>,