diff --git a/src/Avatar.tsx b/src/Avatar.tsx index 9a9bae82..07c7f877 100644 --- a/src/Avatar.tsx +++ b/src/Avatar.tsx @@ -48,10 +48,10 @@ const resolveAvatarSrc = (client: MatrixClient, src: string, size: number) => interface Props extends React.HTMLAttributes { bgKey?: string; - src: string; + src?: string; fallback: string; size?: Size | number; - className: string; + className?: string; style?: CSSProperties; } diff --git a/src/button/Button.tsx b/src/button/Button.tsx index bd7a0dd4..e9936614 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -139,11 +139,12 @@ export function MicButton({ [index: string]: unknown; }) { return ( - + (muted ? "Unmute microphone" : "Mute microphone")} + > - {() => (muted ? "Unmute microphone" : "Mute microphone")} ); } @@ -156,11 +157,12 @@ export function VideoButton({ [index: string]: unknown; }) { return ( - + (muted ? "Turn on camera" : "Turn off camera")} + > - {() => (muted ? "Turn on camera" : "Turn off camera")} ); } @@ -175,11 +177,12 @@ export function ScreenshareButton({ [index: string]: unknown; }) { return ( - + (enabled ? "Stop sharing screen" : "Share screen")} + > - {() => (enabled ? "Stop sharing screen" : "Share screen")} ); } @@ -192,7 +195,7 @@ export function HangupButton({ [index: string]: unknown; }) { return ( - + "Leave"}> - {() => "Leave"} ); } @@ -213,11 +215,10 @@ export function SettingsButton({ [index: string]: unknown; }) { return ( - + "Settings"}> - {() => "Settings"} ); } @@ -230,22 +231,20 @@ export function InviteButton({ [index: string]: unknown; }) { return ( - + "Invite"}> - {() => "Invite"} ); } export function OptionsButton(props: Omit) { return ( - + "Options"}> - {() => "Options"} ); } diff --git a/src/button/LinkButton.tsx b/src/button/LinkButton.tsx index 0ed0cb14..10d64b41 100644 --- a/src/button/LinkButton.tsx +++ b/src/button/LinkButton.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from "react"; +import React, { ReactNode } from "react"; import { Link } from "react-router-dom"; import classNames from "classnames"; @@ -25,10 +25,10 @@ import { ButtonSize, } from "./Button"; interface Props { - className: string; - variant: ButtonVariant; - size: ButtonSize; - children: JSX.Element; + className?: string; + variant?: ButtonVariant; + size?: ButtonSize; + children: ReactNode; [index: string]: unknown; } diff --git a/src/profile/ProfileModal.tsx b/src/profile/ProfileModal.tsx index 26b99e97..3b3033ae 100644 --- a/src/profile/ProfileModal.tsx +++ b/src/profile/ProfileModal.tsx @@ -26,7 +26,7 @@ import styles from "./ProfileModal.module.css"; interface Props { client: MatrixClient; - onClose: () => {}; + onClose: () => void; [rest: string]: unknown; } export function ProfileModal({ client, ...rest }: Props) { diff --git a/src/room/GridLayoutMenu.jsx b/src/room/GridLayoutMenu.jsx index 02f324bf..05d12a47 100644 --- a/src/room/GridLayoutMenu.jsx +++ b/src/room/GridLayoutMenu.jsx @@ -28,11 +28,10 @@ import { Tooltip, TooltipTrigger } from "../Tooltip"; export function GridLayoutMenu({ layout, setLayout }) { return ( - + "Layout Type"}> - {() => "Layout Type"} {(props) => ( diff --git a/src/room/OverflowMenu.jsx b/src/room/OverflowMenu.jsx index c5810f0e..69334c7a 100644 --- a/src/room/OverflowMenu.jsx +++ b/src/room/OverflowMenu.jsx @@ -61,11 +61,10 @@ export function OverflowMenu({ return ( <> - + "More"} placement="top"> - {() => "More"} {(props) => ( diff --git a/src/room/PTTCallView.tsx b/src/room/PTTCallView.tsx index 04c01d0f..aff42ba2 100644 --- a/src/room/PTTCallView.tsx +++ b/src/room/PTTCallView.tsx @@ -38,6 +38,7 @@ import { usePTTSounds } from "../sound/usePttSounds"; import { PTTClips } from "../sound/PTTClips"; import { GroupCallInspector } from "./GroupCallInspector"; import { OverflowMenu } from "./OverflowMenu"; +import { Size } from "../Avatar"; function getPromptText( networkWaiting: boolean, @@ -112,7 +113,7 @@ export const PTTCallView: React.FC = ({ const { modalState: feedbackModalState, modalProps: feedbackModalProps } = useModalTriggerState(); const [containerRef, bounds] = useMeasure({ polyfill: ResizeObserver }); - const facepileSize = bounds.width < 800 ? "sm" : "md"; + const facepileSize = bounds.width < 800 ? Size.SM : Size.MD; const showControls = bounds.height > 500; const pttButtonSize = 232; diff --git a/src/settings/submit-rageshake.ts b/src/settings/submit-rageshake.ts index 20b0785e..f34b0668 100644 --- a/src/settings/submit-rageshake.ts +++ b/src/settings/submit-rageshake.ts @@ -27,10 +27,10 @@ import { useModalTriggerState } from "../Modal"; interface RageShakeSubmitOptions { description: string; - roomId: string; - label: string; + roomId?: string; + label?: string; sendLogs: boolean; - rageshakeRequestId: string; + rageshakeRequestId?: string; } export function useSubmitRageshake(): {