Tweak voice broadcast play icon (#9622)
This commit is contained in:
parent
e38c59c535
commit
5b5c3ab33c
3 changed files with 11 additions and 2 deletions
|
@ -28,3 +28,8 @@ limitations under the License.
|
||||||
.mx_VoiceBroadcastControl-recording {
|
.mx_VoiceBroadcastControl-recording {
|
||||||
color: $alert;
|
color: $alert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_VoiceBroadcastControl-play .mx_Icon {
|
||||||
|
left: 1px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
|
@ -62,14 +62,17 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
||||||
} else {
|
} else {
|
||||||
let controlIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
let controlIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
||||||
let controlLabel: string;
|
let controlLabel: string;
|
||||||
|
let className = "";
|
||||||
|
|
||||||
switch (playbackState) {
|
switch (playbackState) {
|
||||||
case VoiceBroadcastPlaybackState.Stopped:
|
case VoiceBroadcastPlaybackState.Stopped:
|
||||||
controlIcon = PlayIcon;
|
controlIcon = PlayIcon;
|
||||||
|
className = "mx_VoiceBroadcastControl-play";
|
||||||
controlLabel = _t("play voice broadcast");
|
controlLabel = _t("play voice broadcast");
|
||||||
break;
|
break;
|
||||||
case VoiceBroadcastPlaybackState.Paused:
|
case VoiceBroadcastPlaybackState.Paused:
|
||||||
controlIcon = PlayIcon;
|
controlIcon = PlayIcon;
|
||||||
|
className = "mx_VoiceBroadcastControl-play";
|
||||||
controlLabel = _t("resume voice broadcast");
|
controlLabel = _t("resume voice broadcast");
|
||||||
break;
|
break;
|
||||||
case VoiceBroadcastPlaybackState.Playing:
|
case VoiceBroadcastPlaybackState.Playing:
|
||||||
|
@ -79,6 +82,7 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
||||||
}
|
}
|
||||||
|
|
||||||
control = <VoiceBroadcastControl
|
control = <VoiceBroadcastControl
|
||||||
|
className={className}
|
||||||
label={controlLabel}
|
label={controlLabel}
|
||||||
icon={controlIcon}
|
icon={controlIcon}
|
||||||
onClick={toggle}
|
onClick={toggle}
|
||||||
|
|
|
@ -57,7 +57,7 @@ exports[`VoiceBroadcastPlaybackBody when rendering a 0/not-live broadcast should
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
aria-label="resume voice broadcast"
|
aria-label="resume voice broadcast"
|
||||||
class="mx_AccessibleButton mx_VoiceBroadcastControl"
|
class="mx_AccessibleButton mx_VoiceBroadcastControl mx_VoiceBroadcastControl-play"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
>
|
>
|
||||||
|
@ -460,7 +460,7 @@ exports[`VoiceBroadcastPlaybackBody when rendering a stopped broadcast should re
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
aria-label="play voice broadcast"
|
aria-label="play voice broadcast"
|
||||||
class="mx_AccessibleButton mx_VoiceBroadcastControl"
|
class="mx_AccessibleButton mx_VoiceBroadcastControl mx_VoiceBroadcastControl-play"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue