import { getCurrent } from '@tauri-apps/api/webviewWindow'; import classNames from 'classnames'; import React, { useState } from 'react'; import { useOsInfo } from '../hooks/useOsInfo'; import { Button } from './core/Button'; import { HStack } from './core/Stacks'; interface Props { className?: string; onlyX?: boolean; } export function WindowControls({ className, onlyX }: Props) { const [maximized, setMaximized] = useState(false); const osInfo = useOsInfo(); const shouldShow = osInfo?.osType === 'linux' || osInfo?.osType === 'windows'; if (!shouldShow) { return null; } return ( {!onlyX && ( <> )} ); }