17 lines
833 B
TypeScript
17 lines
833 B
TypeScript
import { useState } from 'react';
|
|
|
|
export default function HeroVideoExpand({ title, description, videoSrc, imageSrc }: { title: string; description: string; videoSrc?: string; imageSrc?: string }) {
|
|
return (
|
|
<div className="relative w-full h-screen flex items-center justify-center overflow-hidden">
|
|
{videoSrc ? (
|
|
<video className="absolute inset-0 w-full h-full object-cover" src={videoSrc} autoPlay loop muted playsInline />
|
|
) : (
|
|
<img className="absolute inset-0 w-full h-full object-cover" src={imageSrc} alt={title} />
|
|
)}
|
|
<div className="relative z-10 text-center p-8 bg-black/40 backdrop-blur-sm rounded-xl max-w-2xl">
|
|
<h1 className="text-5xl font-bold text-white mb-4">{title}</h1>
|
|
<p className="text-lg text-white">{description}</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
} |