Update design of VideoTileSettingsModal

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2022-08-02 14:30:33 +02:00
parent a150619d08
commit 33ef680c41
No known key found for this signature in database
GPG key ID: D1D45825D60C24D2
2 changed files with 20 additions and 6 deletions

View file

@ -1,5 +1,16 @@
.videoTileSettingsModal {
width: 700px;
height: 316px;
display: flex;
}
.content {
position: relative;
margin: 27px 34px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.localVolumePercentage {

View file

@ -17,10 +17,10 @@ limitations under the License.
import React, { ChangeEvent, useState } from "react";
import { CallFeed } from "matrix-js-sdk/src/webrtc/callFeed";
import selectInputStyles from "../input/SelectInput.module.css";
import { FieldRow } from "../input/Input";
import { Modal } from "../Modal";
import styles from "./VideoTileSettingsModal.module.css";
import { VolumeIcon } from "../button/VolumeIcon";
interface LocalVolumeProps {
feed: CallFeed;
@ -39,11 +39,8 @@ const LocalVolume: React.FC<LocalVolumeProps> = ({
return (
<>
<h4 className={selectInputStyles.label}> Local Volume </h4>
<FieldRow>
<span className={styles.localVolumePercentage}>
{`${Math.round(localVolume * 100)}%`}
</span>
<VolumeIcon volume={localVolume} />
<input
className={styles.localVolumeSlider}
type="range"
@ -65,7 +62,13 @@ interface Props {
export const VideoTileSettingsModal = ({ feed, ...rest }: Props) => {
return (
<Modal title="Feed settings" isDismissable mobileFullScreen {...rest}>
<Modal
className={styles.videoTileSettingsModal}
title="Local volume"
isDismissable
mobileFullScreen
{...rest}
>
<div className={styles.content}>
<LocalVolume feed={feed} />
</div>