Get volume button inline with design
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
44b9bd0046
commit
44ce76bcb1
3 changed files with 32 additions and 13 deletions
|
|
@ -30,7 +30,7 @@ import { ReactComponent as SettingsIcon } from "../icons/Settings.svg";
|
||||||
import { ReactComponent as AddUserIcon } from "../icons/AddUser.svg";
|
import { ReactComponent as AddUserIcon } from "../icons/AddUser.svg";
|
||||||
import { ReactComponent as ArrowDownIcon } from "../icons/ArrowDown.svg";
|
import { ReactComponent as ArrowDownIcon } from "../icons/ArrowDown.svg";
|
||||||
import { TooltipTrigger } from "../Tooltip";
|
import { TooltipTrigger } from "../Tooltip";
|
||||||
import { ReactComponent as OverflowIcon } from "../icons/Overflow.svg";
|
import { ReactComponent as AudioIcon } from "../icons/Audio.svg";
|
||||||
|
|
||||||
export type ButtonVariant =
|
export type ButtonVariant =
|
||||||
| "default"
|
| "default"
|
||||||
|
|
@ -239,11 +239,11 @@ export function InviteButton({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function OptionsButton(props: Omit<Props, "variant">) {
|
export function AudioButton(props: Omit<Props, "variant">) {
|
||||||
return (
|
return (
|
||||||
<TooltipTrigger tooltip={() => "Options"}>
|
<TooltipTrigger tooltip={() => "Options"}>
|
||||||
<Button variant="icon" {...props}>
|
<Button variant="icon" {...props} tooltip={() => "Volume"}>
|
||||||
<OverflowIcon />
|
<AudioIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import classNames from "classnames";
|
||||||
import styles from "./VideoTile.module.css";
|
import styles from "./VideoTile.module.css";
|
||||||
import { ReactComponent as MicMutedIcon } from "../icons/MicMuted.svg";
|
import { ReactComponent as MicMutedIcon } from "../icons/MicMuted.svg";
|
||||||
import { ReactComponent as VideoMutedIcon } from "../icons/VideoMuted.svg";
|
import { ReactComponent as VideoMutedIcon } from "../icons/VideoMuted.svg";
|
||||||
import { OptionsButton } from "../button/Button";
|
import { AudioButton } from "../button/Button";
|
||||||
|
|
||||||
export const VideoTile = forwardRef(
|
export const VideoTile = forwardRef(
|
||||||
(
|
(
|
||||||
|
|
@ -65,7 +65,13 @@ export const VideoTile = forwardRef(
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
(showName || audioMuted || (videoMuted && !noVideo)) && (
|
(showName || audioMuted || (videoMuted && !noVideo)) && (
|
||||||
<div className={classNames(styles.infoBubble, styles.memberName)}>
|
<div
|
||||||
|
className={classNames(
|
||||||
|
styles.infoBubble,
|
||||||
|
styles.memberName,
|
||||||
|
styles.infoBubbleIcon
|
||||||
|
)}
|
||||||
|
>
|
||||||
{audioMuted && !(videoMuted && !noVideo) && <MicMutedIcon />}
|
{audioMuted && !(videoMuted && !noVideo) && <MicMutedIcon />}
|
||||||
{videoMuted && !noVideo && <VideoMutedIcon />}
|
{videoMuted && !noVideo && <VideoMutedIcon />}
|
||||||
{showName && <span title={name}>{name}</span>}
|
{showName && <span title={name}>{name}</span>}
|
||||||
|
|
@ -73,8 +79,14 @@ export const VideoTile = forwardRef(
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
{showOptions && (
|
{showOptions && (
|
||||||
<div className={classNames(styles.infoBubble, styles.optionsButton)}>
|
<div
|
||||||
<OptionsButton onPress={onOptionsPress} />
|
className={classNames(
|
||||||
|
styles.infoBubble,
|
||||||
|
styles.button,
|
||||||
|
styles.audioButton
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<AudioButton onPress={onOptionsPress} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<video ref={mediaRef} playsInline disablePictureInPicture />
|
<video ref={mediaRef} playsInline disablePictureInPicture />
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@
|
||||||
height: 24px;
|
height: 24px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: rgba(23, 25, 28, 0.85);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
@ -60,16 +59,24 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.optionsButton {
|
.infoBubbleIcon {
|
||||||
right: 16px;
|
background-color: rgba(23, 25, 28, 0.85);
|
||||||
top: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.optionsButton button svg {
|
.button button:hover svg * {
|
||||||
|
fill: white !important; /* To override .iconButton:not(.stroke):hover svg */
|
||||||
|
}
|
||||||
|
|
||||||
|
.button button svg {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.audioButton {
|
||||||
|
right: 16px;
|
||||||
|
top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.memberName {
|
.memberName {
|
||||||
left: 16px;
|
left: 16px;
|
||||||
bottom: 16px;
|
bottom: 16px;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue