import classNames from 'classnames'; import type { HTMLAttributes, ReactNode } from 'react'; import { useIsFullscreen } from '../hooks/useIsFullscreen'; import { useOsInfo } from '../hooks/useOsInfo'; interface HeaderSizeProps extends HTMLAttributes { children?: ReactNode; size: 'md' | 'lg'; ignoreStoplights?: boolean; } export function HeaderSize({ className, style, size, ignoreStoplights, ...props }: HeaderSizeProps) { const platform = useOsInfo(); const fullscreen = useIsFullscreen(); const stoplightsVisible = platform?.osType === 'macos' && !fullscreen && !ignoreStoplights; return (
{/* NOTE: This needs display:grid or else the element shrinks (even though scrollable) */}
); }