parent
3fd6e859df
commit
2aeb2ad65e
2 changed files with 45 additions and 3 deletions
@ -0,0 +1,28 @@ |
|||||||
|
import { Modal } from './Modal'; |
||||||
|
|
||||||
|
type VideoModalProps = { |
||||||
|
videoId: string; |
||||||
|
onClose: () => void; |
||||||
|
}; |
||||||
|
|
||||||
|
export function VideoModal(props: VideoModalProps) { |
||||||
|
const { videoId, onClose } = props; |
||||||
|
|
||||||
|
return ( |
||||||
|
<Modal |
||||||
|
onClose={onClose} |
||||||
|
wrapperClassName="w-[90vw] max-w-4xl h-auto" |
||||||
|
bodyClassName="p-0 bg-black" |
||||||
|
overlayClassName="items-start md:items-center" |
||||||
|
> |
||||||
|
<div className="relative w-full pt-[56.25%]"> |
||||||
|
<iframe |
||||||
|
className="absolute inset-0 h-full w-full" |
||||||
|
src={`https://www.youtube.com/embed/${videoId}?autoplay=1`} |
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" |
||||||
|
allowFullScreen |
||||||
|
/> |
||||||
|
</div> |
||||||
|
</Modal> |
||||||
|
); |
||||||
|
}
|
Loading…
Reference in new issue