import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'; import classNames from 'classnames'; import React, { useState } from 'react'; import { useOsInfo } from '../hooks/useOsInfo'; import {WINDOW_CONTROLS_WIDTH} from "../lib/constants"; import { Button } from './core/Button'; import { HStack } from './core/Stacks'; interface Props { className?: string; onlyX?: boolean; macos?: boolean; } export function WindowControls({ className, onlyX }: Props) { const [maximized, setMaximized] = useState(false); const osInfo = useOsInfo(); // Never show controls on macOS if (osInfo.osType === 'macos') { return null; } return ( {!onlyX && ( <> )} ); }