client/packages/call/src/components/buttons/deaf.tsx
Alois 25c7ee7c26
Some checks failed
/ build-web (push) Failing after 4m33s
/ build-desktop (linux) (push) Failing after 4m36s
/ build-mobile (push) Failing after 7m7s
/ release (push) Has been skipped
(fix): actually migrate all the imports from tensamin/ui to methanium/ui
(feat): update legal loading screen
2026-07-25 18:12:54 +02:00

29 lines
751 B
TypeScript

import { Button, withTooltip } from "@methanium/ui";
import { toggleDeaf, useCall } from "../../store";
import { HeadphoneOff, Headphones } from "lucide-react";
import { type CallButtonProps, iconScale } from "./tooltipButton";
export default function DeafButton({
className,
iconSize,
tooltip,
portalContainer,
}: CallButtonProps) {
const deaf = useCall((state) => state.deaf);
const button = (
<Button
variant={deaf ? "destructive" : "default"}
onClick={toggleDeaf}
className={className}
>
{deaf ? (
<HeadphoneOff style={iconScale(iconSize)} />
) : (
<Headphones style={iconScale(iconSize)} />
)}
</Button>
);
return withTooltip(button, tooltip, portalContainer);
}