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:
commit
85959046a5
4 changed files with 19 additions and 5 deletions
|
|
@ -24,11 +24,13 @@ import { Body } from "./typography/Typography";
|
||||||
interface Props {
|
interface Props {
|
||||||
userIds: Set<string>;
|
userIds: Set<string>;
|
||||||
room: Room;
|
room: Room;
|
||||||
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const IncompatibleVersionModal: React.FC<Props> = ({
|
export const IncompatibleVersionModal: React.FC<Props> = ({
|
||||||
userIds,
|
userIds,
|
||||||
room,
|
room,
|
||||||
|
onClose,
|
||||||
...rest
|
...rest
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
@ -38,7 +40,12 @@ export const IncompatibleVersionModal: React.FC<Props> = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal title={t("Incompatible versions")} isDismissable {...rest}>
|
<Modal
|
||||||
|
title={t("Incompatible versions")}
|
||||||
|
isDismissable
|
||||||
|
onClose={onClose}
|
||||||
|
{...rest}
|
||||||
|
>
|
||||||
<ModalContent>
|
<ModalContent>
|
||||||
<Body>
|
<Body>
|
||||||
<Trans>
|
<Trans>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export interface ModalProps extends OverlayProps, AriaDialogProps {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
mobileFullScreen?: boolean;
|
mobileFullScreen?: boolean;
|
||||||
onClose?: () => void;
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Modal({
|
export function Modal({
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import styles from "./JoinExistingCallModal.module.css";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onJoin: (e: PressEvent) => void;
|
onJoin: (e: PressEvent) => void;
|
||||||
onClose: (e: PressEvent) => void;
|
onClose: () => void;
|
||||||
// TODO: add used parameters for <Modal>
|
// TODO: add used parameters for <Modal>
|
||||||
[index: string]: unknown;
|
[index: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|
@ -33,7 +33,12 @@ export function JoinExistingCallModal({ onJoin, onClose, ...rest }: Props) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal title={t("Join existing call?")} isDismissable {...rest}>
|
<Modal
|
||||||
|
title={t("Join existing call?")}
|
||||||
|
isDismissable
|
||||||
|
{...rest}
|
||||||
|
onClose={onClose}
|
||||||
|
>
|
||||||
<ModalContent>
|
<ModalContent>
|
||||||
<p>{t("This call already exists, would you like to join?")}</p>
|
<p>{t("This call already exists, would you like to join?")}</p>
|
||||||
<FieldRow rightAlign className={styles.buttons}>
|
<FieldRow rightAlign className={styles.buttons}>
|
||||||
|
|
|
||||||
|
|
@ -59,9 +59,10 @@ const LocalVolume: React.FC<LocalVolumeProps> = ({
|
||||||
// TODO: Extend ModalProps
|
// TODO: Extend ModalProps
|
||||||
interface Props {
|
interface Props {
|
||||||
feed: CallFeed;
|
feed: CallFeed;
|
||||||
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const VideoTileSettingsModal = ({ feed, ...rest }: Props) => {
|
export const VideoTileSettingsModal = ({ feed, onClose, ...rest }: Props) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -70,6 +71,7 @@ export const VideoTileSettingsModal = ({ feed, ...rest }: Props) => {
|
||||||
title={t("Local volume")}
|
title={t("Local volume")}
|
||||||
isDismissable
|
isDismissable
|
||||||
mobileFullScreen
|
mobileFullScreen
|
||||||
|
onClose={onClose}
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue