mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-20 16:51:10 +00:00
Extracted YouTubeTrailerModal component
This commit is contained in:
parent
b595e845bb
commit
8f11ef417b
1 changed files with 29 additions and 0 deletions
29
frontend/src/components/modals/YouTubeTrailerModal.jsx
Normal file
29
frontend/src/components/modals/YouTubeTrailerModal.jsx
Normal 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>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue