File size: 561 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import { useTranslate } from 'i18n-calypso';
import './style.scss';

interface PluginFeaturedVideoVideoProps {
	id: string;
	src: string;
	productName: string;
}

export const PluginFeaturedVideo = ( { id, src, productName }: PluginFeaturedVideoVideoProps ) => {
	const translate = useTranslate();

	const getIframeTitle = () =>
		translate( '%s Product Video', { args: [ productName ], textOnly: true } );

	return (
		<iframe
			className="plugin-featured-video__iframe"
			id={ id }
			src={ src }
			title={ getIframeTitle() }
			loading="lazy"
		/>
	);
};