import classNames from 'classnames'; import type { HTMLAttributes, ReactNode } from 'react'; import React from 'react'; import { useOsInfo } from '../hooks/useOsInfo'; import { useSettings } from '../hooks/useSettings'; import { useStoplightsVisible } from '../hooks/useStoplightsVisible'; import { HEADER_SIZE_LG, HEADER_SIZE_MD, WINDOW_CONTROLS_WIDTH } from '../lib/constants'; import { WindowControls } from './WindowControls'; interface HeaderSizeProps extends HTMLAttributes { children?: ReactNode; size: 'md' | 'lg'; ignoreControlsSpacing?: boolean; onlyXWindowControl?: boolean; } export function HeaderSize({ className, style, size, ignoreControlsSpacing, onlyXWindowControl, children, }: HeaderSizeProps) { const osInfo = useOsInfo(); const settings = useSettings(); const stoplightsVisible = useStoplightsVisible(); return (
{/* NOTE: This needs display:grid or else the element shrinks (even though scrollable) */}
{children}
); }