Merge pull request #727 from vector-im/dbkr/fix_join_call_close_button

Fix close button on join call modal
This commit is contained in:
David Baker 2022-11-07 14:07:38 +00:00 committed by GitHub
commit 85959046a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 5 deletions

View file

@ -24,11 +24,13 @@ import { Body } from "./typography/Typography";
interface Props {
userIds: Set<string>;
room: Room;
onClose: () => void;
}
export const IncompatibleVersionModal: React.FC<Props> = ({
userIds,
room,
onClose,
...rest
}) => {
const { t } = useTranslation();
@ -38,7 +40,12 @@ export const IncompatibleVersionModal: React.FC<Props> = ({
);
return (
<Modal title={t("Incompatible versions")} isDismissable {...rest}>
<Modal
title={t("Incompatible versions")}
isDismissable
onClose={onClose}
{...rest}
>
<ModalContent>
<Body>
<Trans>

View file

@ -43,7 +43,7 @@ export interface ModalProps extends OverlayProps, AriaDialogProps {
children: ReactNode;
className?: string;
mobileFullScreen?: boolean;
onClose?: () => void;
onClose: () => void;
}
export function Modal({

View file

@ -25,7 +25,7 @@ import styles from "./JoinExistingCallModal.module.css";
interface Props {
onJoin: (e: PressEvent) => void;
onClose: (e: PressEvent) => void;
onClose: () => void;
// TODO: add used parameters for <Modal>
[index: string]: unknown;
}
@ -33,7 +33,12 @@ export function JoinExistingCallModal({ onJoin, onClose, ...rest }: Props) {
const { t } = useTranslation();
return (
<Modal title={t("Join existing call?")} isDismissable {...rest}>
<Modal
title={t("Join existing call?")}
isDismissable
{...rest}
onClose={onClose}
>
<ModalContent>
<p>{t("This call already exists, would you like to join?")}</p>
<FieldRow rightAlign className={styles.buttons}>

View file

@ -59,9 +59,10 @@ const LocalVolume: React.FC<LocalVolumeProps> = ({
// TODO: Extend ModalProps
interface Props {
feed: CallFeed;
onClose: () => void;
}
export const VideoTileSettingsModal = ({ feed, ...rest }: Props) => {
export const VideoTileSettingsModal = ({ feed, onClose, ...rest }: Props) => {
const { t } = useTranslation();
return (
@ -70,6 +71,7 @@ export const VideoTileSettingsModal = ({ feed, ...rest }: Props) => {
title={t("Local volume")}
isDismissable
mobileFullScreen
onClose={onClose}
{...rest}
>
<div className={styles.content}>