mirror of
https://github.com/lux-tel/websites.git
synced 2026-10-30 20:31:36 +00:00
13 lines
371 B
TypeScript
13 lines
371 B
TypeScript
'use client';
|
|
|
|
import type { ReactNode } from 'react';
|
|
import { createPortal } from 'react-dom';
|
|
|
|
export const portalChildClassName = 'pointer-events-auto z-[20000]';
|
|
|
|
export function ReactPortal({ children }: { children: ReactNode }) {
|
|
return typeof document !== 'undefined' && document.body !== undefined
|
|
? createPortal(children, document.body)
|
|
: children;
|
|
}
|