(wip): add onboarding
(fix): login page reloading
This commit is contained in:
parent
b6dfb4d019
commit
bf8f449f03
19 changed files with 461 additions and 439 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Button } from "@tensamin/ui";
|
||||
import { Button, withTooltip } from "@tensamin/ui";
|
||||
import { toggleDeaf, useCall } from "../../store";
|
||||
import { HeadphoneOff, Headphones } from "lucide-react";
|
||||
import { type CallButtonProps, iconScale, withTooltip } from "./tooltipButton";
|
||||
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
||||
|
||||
export default function DeafButton({
|
||||
className,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { LeaveIcon } from "@livekit/components-react";
|
||||
import { Button } from "@tensamin/ui";
|
||||
import { Button, withTooltip } from "@tensamin/ui";
|
||||
import { disconnect, useCall } from "../../store";
|
||||
import { type CallButtonProps, iconScale, withTooltip } from "./tooltipButton";
|
||||
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
||||
|
||||
export default function LeaveButton({
|
||||
className,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Button } from "@tensamin/ui";
|
||||
import { Button, withTooltip } from "@tensamin/ui";
|
||||
import { toggleMute, useCall } from "../../store";
|
||||
import { Mic, MicOff } from "lucide-react";
|
||||
import { type CallButtonProps, iconScale, withTooltip } from "./tooltipButton";
|
||||
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
||||
|
||||
export default function MuteButton({
|
||||
className,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
import { type ReactElement } from "react";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@tensamin/ui";
|
||||
|
||||
export type CallButtonProps = {
|
||||
className?: string;
|
||||
iconSize?: number;
|
||||
|
|
@ -11,22 +8,3 @@ export type CallButtonProps = {
|
|||
export function iconScale(iconSize?: number) {
|
||||
return { scale: (iconSize ? iconSize + 100 : 100) + "%" };
|
||||
}
|
||||
|
||||
export function withTooltip(
|
||||
button: ReactElement,
|
||||
tooltip?: string,
|
||||
portalContainer?: HTMLElement,
|
||||
) {
|
||||
if (!tooltip) {
|
||||
return button;
|
||||
}
|
||||
|
||||
return (
|
||||
<Tooltip>
|
||||
<TooltipTrigger render={button} />
|
||||
<TooltipContent portalProps={{ container: portalContainer }}>
|
||||
{tooltip}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue