// src/components/NewsPanel.jsx import React from 'react'; // เปลี่ยน videoStreamUrl เป็น youtubeVideoId export default function NewsPanel({ title, content, youtubeVideoId, isActive }) { const panelClasses = ` card w-80 shadow-2xl z-10 p-6 transition-all duration-500 ease-in-out transform ${isActive ? 'opacity-100 translate-x-0' : 'opacity-0 -translate-x-full pointer-events-none'} ${isActive ? 'glass bg-base-200 text-base-content' : ''} `; return (
{content}
{/* ส่วนสำหรับ YouTube Video Embed */} {youtubeVideoId && ( // ตรวจสอบว่ามี youtubeVideoId ส่งมาหรือไม่