7
0
mirror of https://github.com/pelican-dev/panel.git synced 2025-06-11 20:49:01 +02:00
2022-06-20 14:16:42 -04:00

9 lines
275 B
TypeScript

import React, { useRef } from 'react';
import { createPortal } from 'react-dom';
export default ({ children }: { children: React.ReactNode }) => {
const element = useRef(document.getElementById('modal-portal'));
return createPortal(children, element!.current!);
};