-
-
Notifications
You must be signed in to change notification settings - Fork 361
Expand file tree
/
Copy pathBlogVimeoVideo.tsx
More file actions
35 lines (33 loc) · 868 Bytes
/
BlogVimeoVideo.tsx
File metadata and controls
35 lines (33 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import clsx from 'clsx';
import Script from 'next/script';
type Props = {
className?: string;
src: string;
title: string;
};
export default function BlogVimeoVideo({className, src, title}: Props) {
return (
<>
<div
className={clsx(
'relative w-full overflow-hidden rounded-lg shadow-lg',
className
)}
style={{padding: '56.25% 0 0 0'}}
>
<iframe
allow="autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share"
className="absolute left-0 top-0 h-full w-full border-0"
frameBorder={0}
referrerPolicy="strict-origin-when-cross-origin"
src={src}
title={title}
/>
</div>
<Script
src="https://player.vimeo.com/api/player.js"
strategy="lazyOnload"
/>
</>
);
}