Extracted YouTubeTrailerModal component

This commit is contained in:
Nick Sandstrom 2026-02-24 00:59:59 -08:00
parent b595e845bb
commit 8f11ef417b

View file

@ -0,0 +1,29 @@
import { Box, Modal } from '@mantine/core';
import React from 'react';
export const YouTubeTrailerModal = ({ opened, onClose, trailerUrl }) => {
return (
<Modal opened={opened} onClose={onClose} title="Trailer" size="xl" centered>
<Box pos="relative" pb={'56.25%'} h={0}>
{trailerUrl && (
<iframe
src={trailerUrl}
title="YouTube Trailer"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerPolicy="strict-origin-when-cross-origin"
allowFullScreen
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
borderRadius: 8,
}}
/>
)}
</Box>
</Modal>
);
};