client/packages/call/src/components/buttons/leave.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

26 lines
705 B
TypeScript

import { LeaveIcon } from "@livekit/components-react";
import { Button, withTooltip } from "@methanium/ui";
import { disconnect, useCall } from "../../store";
import { type CallButtonProps, iconScale } from "./tooltipButton";
export default function LeaveButton({
className,
iconSize,
tooltip,
portalContainer,
}: CallButtonProps) {
const state = useCall((store) => store.state);
const button = (
<Button
className={className}
onClick={() => disconnect()}
disabled={state === "closing" || state === "closed"}
variant="destructive"
>
<LeaveIcon style={iconScale(iconSize)} />
</Button>
);
return withTooltip(button, tooltip, portalContainer);
}