fix backgroundBlurToggleClick -> videoBlurToggleClick

This commit is contained in:
Timo K
2026-05-20 17:03:45 +02:00
parent 509e4d739f
commit dc52573ce2
4 changed files with 8 additions and 8 deletions

View File

@@ -198,7 +198,7 @@ export const CallFooter: FC<FooterProps> = ({ ref, children, vm }) => {
options={videoOptions} options={videoOptions}
selectedOption={selectedVideo} selectedOption={selectedVideo}
onSelect={selectVideoButtonOption} onSelect={selectVideoButtonOption}
backgroundBlurToggleClick={toggleBlur} videoBlurToggleClick={toggleBlur}
videoBlurEnabled={videoBlurEnabled} videoBlurEnabled={videoBlurEnabled}
/>, />,
); );

View File

@@ -43,7 +43,7 @@ export const AudioMute: Story = {
{ label: { type: "name", name: "Microphone 2" }, id: "2" }, { label: { type: "name", name: "Microphone 2" }, id: "2" },
], ],
videoBlurEnabled: true, videoBlurEnabled: true,
backgroundBlurToggleClick: fn(), videoBlurToggleClick: fn(),
selectedOption: "2", selectedOption: "2",
}, },
play: async ({ args, canvasElement }) => { play: async ({ args, canvasElement }) => {
@@ -94,7 +94,7 @@ export const VideoUnmute: Story = {
{ label: { type: "name", name: "Camera 2" }, id: "2" }, { label: { type: "name", name: "Camera 2" }, id: "2" },
], ],
videoBlurEnabled: true, videoBlurEnabled: true,
backgroundBlurToggleClick: fn(), videoBlurToggleClick: fn(),
selectedOption: "2", selectedOption: "2",
}, },
}; };

View File

@@ -194,7 +194,7 @@ describe("MediaMuteAndSwitchButton", () => {
title="Switcher" title="Switcher"
iconsAndLabels="video" iconsAndLabels="video"
enabled={true} enabled={true}
backgroundBlurToggleClick={onVideoBlurToggle} videoBlurToggleClick={onVideoBlurToggle}
onSelect={onSelect} onSelect={onSelect}
/> />
</TooltipProvider>, </TooltipProvider>,

View File

@@ -44,7 +44,7 @@ export interface MediaMuteAndSwitchButtonProps {
options?: MenuOptions[]; options?: MenuOptions[];
/** The option that will currently be rendered as the selected option */ /** The option that will currently be rendered as the selected option */
selectedOption?: string; selectedOption?: string;
backgroundBlurToggleClick?: () => void; videoBlurToggleClick?: () => void;
videoBlurEnabled?: boolean; videoBlurEnabled?: boolean;
/** /**
* For any toggle and option this method will be called. * For any toggle and option this method will be called.
@@ -63,7 +63,7 @@ export const MediaMuteAndSwitchButton: FC<MediaMuteAndSwitchButtonProps> = ({
options, options,
selectedOption, selectedOption,
videoBlurEnabled, videoBlurEnabled,
backgroundBlurToggleClick, videoBlurToggleClick,
onSelect, onSelect,
}) => { }) => {
const [plannedSelection, setPlannedSelection] = useState<string | null>(null); const [plannedSelection, setPlannedSelection] = useState<string | null>(null);
@@ -85,7 +85,7 @@ export const MediaMuteAndSwitchButton: FC<MediaMuteAndSwitchButtonProps> = ({
data-testid="incall_videomute" data-testid="incall_videomute"
/> />
); );
if (backgroundBlurToggleClick !== undefined) { if (videoBlurToggleClick !== undefined) {
toggles = [ toggles = [
{ {
label: t("action.blur_background"), label: t("action.blur_background"),
@@ -200,7 +200,7 @@ export const MediaMuteAndSwitchButton: FC<MediaMuteAndSwitchButtonProps> = ({
<ToggleMenuItem <ToggleMenuItem
label={toggle.label} label={toggle.label}
onSelect={(e) => { onSelect={(e) => {
backgroundBlurToggleClick?.(); videoBlurToggleClick?.();
e.preventDefault(); e.preventDefault();
}} }}
checked={toggle.enabled ?? false} checked={toggle.enabled ?? false}