diff --git a/documentation/docs/guides/interactive-chat/index.md b/documentation/docs/guides/interactive-chat/index.md index 7b3902c0b600..97cd81656b25 100644 --- a/documentation/docs/guides/interactive-chat/index.md +++ b/documentation/docs/guides/interactive-chat/index.md @@ -57,5 +57,10 @@ import styles from '@site/src/components/Card/styles.module.css'; description="Automatically render visual representations of data as you interact with it, powered by MCP-UI" link="/blog/2025/08/27/autovisualiser-with-mcp-ui" /> + \ No newline at end of file diff --git a/documentation/docs/guides/recipes/index.md b/documentation/docs/guides/recipes/index.mdx similarity index 81% rename from documentation/docs/guides/recipes/index.md rename to documentation/docs/guides/recipes/index.mdx index 3ca797e44fb2..3e77aecff7fa 100644 --- a/documentation/docs/guides/recipes/index.md +++ b/documentation/docs/guides/recipes/index.mdx @@ -6,6 +6,7 @@ description: Reusable and shareable AI workflows import Card from '@site/src/components/Card'; import styles from '@site/src/components/Card/styles.module.css'; +import VideoCarousel from '@site/src/components/VideoCarousel';

Recipes

@@ -22,7 +23,7 @@ import styles from '@site/src/components/Card/styles.module.css'; allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen > - +

📚 Documentation & Guides

@@ -91,3 +92,27 @@ import styles from '@site/src/components/Card/styles.module.css'; />
+ +
+

🎥 More Videos

+ + +
\ No newline at end of file diff --git a/documentation/src/components/VideoCarousel.js b/documentation/src/components/VideoCarousel.js new file mode 100644 index 000000000000..e671bd1cdb64 --- /dev/null +++ b/documentation/src/components/VideoCarousel.js @@ -0,0 +1,99 @@ +// src/components/VideoCarousel.js +import React from 'react'; +import { Swiper, SwiperSlide } from 'swiper/react'; +import { Navigation, Pagination, FreeMode } from 'swiper/modules'; +import 'swiper/css'; +import 'swiper/css/navigation'; +import 'swiper/css/pagination'; +import 'swiper/css/free-mode'; + +const VideoCarousel = ({ videos, id, width = '100%', names = [] }) => { + const [activeIndex, setActiveIndex] = React.useState(0); + + const getCurrentVideoName = () => { + if (Array.isArray(names) && names.length > activeIndex && names[activeIndex]) { + return names[activeIndex]; + } + return ''; + }; + + return ( +
+ {getCurrentVideoName() && ( +

{getCurrentVideoName()}

+ )} + setActiveIndex(swiper.activeIndex)} + > + {videos.map((video, index) => ( + +
+
+ {video.type === 'iframe' ? ( + + ) : ( +
+ {(video.description || video.duration) && ( +
+ {video.description && {video.description}} + {video.duration && ( + + • + {video.duration} + + )} +
+ )} +
+
+ ))} +
+
+ ); +}; + +export default VideoCarousel;