Make onClose required in Modal

This commit is contained in:
David Baker 2022-11-07 12:23:21 +00:00
parent 509fd65156
commit 51572b5787
3 changed files with 12 additions and 3 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

@ -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}>