import React, { FC, useState } from 'react'; import cn from 'classnames'; import { CloseButton as DefaultCloseButton } from './CloseButton'; import { IBaseVideoModalProps } from './types'; import { BaseModal } from '../BaseModal'; import { useWrapperSize } from './utils'; import { VideoPlayer } from '../VideoPlayer'; import { prefixedClasNames } from '../../utils/prefixedClassNames'; /** * BaseVideoModal component for displaying videos in a modal dialog. * * This component combines the functionality of a modal with a video player, * providing a seamless way to present video content in a focused overlay. * * @link See examples https://antonbobrov.github.io/react-kit/?path=/docs/modals-basevideomodal--docs * * @requires Requires styles: `@import '~@anton.bobrov/react-components/lib/styles/components/BaseVideoModal';` */ export const BaseVideoModal: FC = ({ className, player, wrapperProps, renderCloseButton: CloseButton = DefaultCloseButton, getWrapperSize, ...modalProps }) => { const [isLoaded, setIsLoaded] = useState(false); const wrapperSize = useWrapperSize(getWrapperSize); return (
setIsLoaded(true)} />
); };