import type { FC } from 'react' import { createPortal } from 'react-dom' import { RiCloseLine } from '@remixicon/react' import React from 'react' import { useHotkeys } from 'react-hotkeys-hook' type VideoPreviewProps = { url: string title: string onCancel: () => void } const VideoPreview: FC = ({ url, title, onCancel, }) => { useHotkeys('esc', onCancel) return createPortal(
e.stopPropagation()} tabIndex={-1} >
, document.body, ) } export default VideoPreview