review changes

This commit is contained in:
Timo K 2022-07-29 15:07:35 +02:00
parent 4f36d149d7
commit cb5b3e9468
4 changed files with 22 additions and 19 deletions

View file

@ -19,21 +19,22 @@ import React, { FormEventHandler, forwardRef } from "react";
import styles from "./Form.module.css"; import styles from "./Form.module.css";
export const Form = forwardRef< interface FormProps {
HTMLFormElement, className: string;
{ onSubmit: FormEventHandler<HTMLFormElement>;
className: string; children: JSX.Element[];
onSubmit: FormEventHandler<HTMLFormElement>; }
children: JSX.Element[];
export const Form = forwardRef<HTMLFormElement, FormProps>(
({ children, className, onSubmit }, ref) => {
return (
<form
onSubmit={onSubmit}
className={classNames(styles.form, className)}
ref={ref}
>
{children}
</form>
);
} }
>(({ children, className, onSubmit }, ref) => { );
return (
<form
onSubmit={onSubmit}
className={classNames(styles.form, className)}
ref={ref}
>
{children}
</form>
);
});

View file

@ -29,7 +29,7 @@ import { GroupCallRoom } from "./useGroupCallRooms";
interface CallListProps { interface CallListProps {
rooms: GroupCallRoom[]; rooms: GroupCallRoom[];
client: MatrixClient; client: MatrixClient;
disableFacepile: boolean; disableFacepile?: boolean;
} }
export function CallList({ rooms, client, disableFacepile }: CallListProps) { export function CallList({ rooms, client, disableFacepile }: CallListProps) {
return ( return (
@ -62,7 +62,7 @@ interface CallTileProps {
roomId: string; roomId: string;
participants: RoomMember[]; participants: RoomMember[];
client: MatrixClient; client: MatrixClient;
disableFacepile: boolean; disableFacepile?: boolean;
} }
function CallTile({ function CallTile({
name, name,

View file

@ -21,6 +21,7 @@ import { Modal, ModalContent } from "../Modal";
import { Button } from "../button"; import { Button } from "../button";
import { FieldRow } from "../input/Input"; import { FieldRow } from "../input/Input";
import styles from "./JoinExistingCallModal.module.css"; import styles from "./JoinExistingCallModal.module.css";
interface Props { interface Props {
onJoin: (e: PressEvent) => void; onJoin: (e: PressEvent) => void;
onClose: (e: PressEvent) => void; onClose: (e: PressEvent) => void;

View file

@ -37,6 +37,7 @@ import { JoinExistingCallModal } from "./JoinExistingCallModal";
import { Title } from "../typography/Typography"; import { Title } from "../typography/Typography";
import { Form } from "../form/Form"; import { Form } from "../form/Form";
import { CallType, CallTypeDropdown } from "./CallTypeDropdown"; import { CallType, CallTypeDropdown } from "./CallTypeDropdown";
interface Props { interface Props {
client: MatrixClient; client: MatrixClient;
isPasswordlessUser: boolean; isPasswordlessUser: boolean;