2024-03-18 15:23:51 +01:00
|
|
|
// biome-ignore lint/correctness/noUnusedImports: Needs this for React to work
|
2022-01-26 12:57:42 +01:00
|
|
|
import React from 'react';
|
|
|
|
import Admonition from '@theme/Admonition';
|
|
|
|
|
2023-10-10 11:42:25 +02:00
|
|
|
const Component = ({ videoUrls }) => {
|
2022-01-26 12:57:42 +01:00
|
|
|
return (
|
2023-10-10 11:42:25 +02:00
|
|
|
<article className='unleash-video-container'>
|
|
|
|
{videoUrls ? (
|
|
|
|
videoUrls.map((url) => (
|
|
|
|
<iframe
|
|
|
|
key={url}
|
|
|
|
width='100%'
|
|
|
|
height='auto'
|
|
|
|
src={url}
|
|
|
|
title='YouTube video player'
|
|
|
|
allowFullScreen
|
2024-03-13 12:30:40 +01:00
|
|
|
/>
|
2023-10-10 11:42:25 +02:00
|
|
|
))
|
|
|
|
) : (
|
|
|
|
<Admonition type='danger'>
|
|
|
|
You need to provide YouTube video URLs for this component to
|
|
|
|
work properly.
|
|
|
|
</Admonition>
|
|
|
|
)}
|
2022-01-26 12:57:42 +01:00
|
|
|
</article>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Component;
|