feat: aspect-ratio instead of width measurer

This commit is contained in:
ner committed 2024-08-31 21:36:16 +03:00
1 parent 375ebf93d9
commit 279a61ddcd
15 files changed
+168 -313

No files matched your search

@@ -17,10 +17,11 @@ const Trailer: FC<{ trailerKey?: string } & InstanceProps<void>> = ({ trailerKey
if (!trailerKey) return;
return (
<Modal className='block p-0 min-h-[400px] border-none aspect-w-16 aspect-h-9' onClose={onResolve}>
<Modal className='block p-0 min-h-[400px] border-none' style={{ aspectRatio: '16/9' }} onClose={onResolve}>
<iframe
allow='autoplay'
className='border-none rounded-lg'
style={{ aspectRatio: '16/9' }}
width='100%'
height='100%'
src={`//www.youtube.com/embed/${trailerKey}?autoplay=1`}