import { platform } from "@yaakapp-internal/platform"; import classNames from "classnames"; import { useState } from "react"; import { WINDOW_CONTROLS_WIDTH } from "../lib/constants"; import { Button } from "./Button"; interface Props { className?: string; onlyX?: boolean; osType: string; hideWindowControls: boolean; useNativeTitlebar: boolean; } export function WindowControls({ className, onlyX, osType, hideWindowControls, useNativeTitlebar, }: Props) { const [maximized, setMaximized] = useState(false); // Never show controls on macOS or if hideWindowControls is true if (osType === "macos" || hideWindowControls || useNativeTitlebar) { return null; } return (
{!onlyX && ( <> )}
); }