2022-01-26 12:57:42 +01:00
|
|
|
import React from 'react';
|
|
|
|
import Admonition from '@theme/Admonition';
|
|
|
|
|
|
|
|
const Component = ({ videoUrls, children }) => {
|
|
|
|
return (
|
2022-01-26 13:12:22 +01:00
|
|
|
<article className="unleash-video-container">
|
|
|
|
<Admonition type="tip" title="Video content">
|
|
|
|
{children}
|
|
|
|
Hey! Did you know that the content in this guide is also
|
|
|
|
available in video format? If that's more your speed, feel free
|
|
|
|
to check out one of these related videos 🍿📽
|
|
|
|
</Admonition>
|
2022-01-26 12:57:42 +01:00
|
|
|
|
2022-01-26 13:12:22 +01:00
|
|
|
<div className="videos">
|
|
|
|
{videoUrls ? (
|
|
|
|
videoUrls.map((url) => (
|
|
|
|
<iframe
|
|
|
|
key={url}
|
|
|
|
width="100%"
|
|
|
|
height="auto"
|
|
|
|
src={url}
|
|
|
|
title="YouTube video player"
|
|
|
|
frameBorder="0"
|
|
|
|
allowFullScreen
|
|
|
|
></iframe>
|
|
|
|
))
|
|
|
|
) : (
|
|
|
|
<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
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Component;
|