import { forwardRef, type ForwardRefRenderFunction, type HTMLAttributes, type ReactNode, } from 'react'; import styles from './overlay.module.scss'; export type OverlayProps = HTMLAttributes & { /** * The elements to display in front of the overlay. */ children: ReactNode; }; const OverlayWithRef: ForwardRefRenderFunction = ( { children, className = '', ...props }, ref ) => { const overlayClass = [styles.overlay, className].join(' '); return (
{children}
); }; /** * Overlay component. */ export const Overlay = forwardRef(OverlayWithRef);