diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx
index 22741b22..0fe66d61 100644
--- a/src/components/launch/LaunchWindow.tsx
+++ b/src/components/launch/LaunchWindow.tsx
@@ -127,9 +127,8 @@ export function DropdownItem({
);
}
-export function Separator({ dropdown = false }: { dropdown?: boolean }) {
- return
;
-}
+import { Separator } from "@/components/ui/separator";
+import { Button } from "../ui/button";
function MicDeviceRow({
device,
@@ -997,15 +996,20 @@ export function LaunchWindow() {
-
+
>
)}
-
{microphoneEnabled ? : }
-
+
-
{webcamEnabled ? : }
-
+
- toggleDropdown("countdown")}
title={t("recording.countdownDelay")}
className={countdownDelay > 0 ? styles.ibActive : ""}
>
-
+
-
+
-
+
- toggleDropdown("more")}
title={t("recording.more")}
>
-
+
- window.electronAPI?.hudOverlayHide?.()}
title={t("recording.hideHud")}
>
-
+
- window.electronAPI?.hudOverlayClose?.()}
title={t("recording.closeApp")}
>
-
+
>
);
diff --git a/src/components/launch/RecordingControls.tsx b/src/components/launch/RecordingControls.tsx
index 05fc3d7f..3044e293 100644
--- a/src/components/launch/RecordingControls.tsx
+++ b/src/components/launch/RecordingControls.tsx
@@ -1,8 +1,8 @@
import { Microphone as Mic, MicrophoneSlash as MicOff, Minus, Pause, Play, Stop as Square, X } from "@phosphor-icons/react";
import { useMemo } from "react";
import { useScopedT } from "@/contexts/I18nContext";
-import { IconButton } from "./LaunchWindow";
-import { Separator } from "./LaunchWindow";
+import { Button } from "@/components/ui/button";
+import { Separator } from "@/components/ui/separator";
import styles from "./LaunchWindow.module.css";
interface RecordingControlsProps {
@@ -56,9 +56,12 @@ export const RecordingControls = ({
{formatTime(elapsed)}
-
+
-
- {microphoneEnabled ? : }
-
+ {microphoneEnabled ? (
+
+ ) : (
+
+ )}
+
-
+
-
)}
-
+
-
-
+
-
-
+
-
+
+
>
);
}, [
diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx
index 8dc9d07c..2ea10d35 100644
--- a/src/components/ui/button.tsx
+++ b/src/components/ui/button.tsx
@@ -5,7 +5,7 @@ import * as React from "react";
import { cn } from "@/lib/utils";
const buttonVariants = cva(
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
{
variants: {
variant: {
@@ -24,10 +24,18 @@ const buttonVariants = cva(
lg: "h-10 rounded-md px-8",
icon: "h-9 w-9",
},
+ // Special variant for icon buttons with consistent sizing
+ iconSize: {
+ default: "[&_svg]:size-4",
+ sm: "[&_svg]:size-3.5",
+ lg: "[&_svg]:size-5",
+ xl: "[&_svg]:size-6",
+ },
},
defaultVariants: {
variant: "default",
size: "default",
+ iconSize: "default",
},
},
);
@@ -35,15 +43,18 @@ const buttonVariants = cva(
export interface ButtonProps
extends React.ButtonHTMLAttributes,
VariantProps {
+ /** Whether to render the button as a child component (useful for composition) */
asChild?: boolean;
+ /** Size of the icon inside the button */
+ iconSize?: "default" | "sm" | "lg" | "xl";
}
const Button = React.forwardRef(
- ({ className, variant, size, asChild = false, ...props }, ref) => {
+ ({ className, variant, size, iconSize, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
return (
@@ -53,3 +64,4 @@ const Button = React.forwardRef(
Button.displayName = "Button";
export { Button, buttonVariants };
+