Add variant prop to VideoPlayer component

This commit is contained in:
2026-01-07 23:32:51 +01:00
parent b426182ac9
commit c9a59bb443

View File

@@ -1,11 +1,13 @@
interface Props { interface Props {
src: string; src: string;
variant?: 'compact' | 'wide';
} }
export default function VideoPlayer({ src }: Props) { export default function VideoPlayer({ src, variant = 'wide' }: Props) {
if (!src) return null; if (!src) return null;
const className = variant === 'compact' ? 'video-shell compact' : 'video-shell';
return ( return (
<div className="video-shell"> <div className={className}>
<video controls src={src} preload="metadata" /> <video controls src={src} preload="metadata" />
</div> </div>
); );