import { createElement, forwardRef, type HTMLAttributes } from "react"; type ScrollElement = "div" | "aside" | "nav"; type OverlayScrollProps = HTMLAttributes & { element?: ScrollElement }; // Keep the name so the three mounts stay put; R11 retired the overlay in favour of native scrolling. export const OverlayScroll = forwardRef(function OverlayScroll( { element = "div", className, children, ...props }, ref, ) { return createElement( element, { ...props, className, ref, tabIndex: props.tabIndex ?? 0 }, children, ); });