Make onClose required in Modal
This commit is contained in:
parent
509fd65156
commit
51572b5787
3 changed files with 12 additions and 3 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({
|
||||||
|
|
|
@ -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
Reference in a new issue