Files
vod-system/frontend/src/components/video/MetadataBox.tsx
Dylan De Faoite 9033261165
All checks were successful
CI / Maven unit tests (push) Successful in 14s
CI / Build and push images (push) Successful in 48s
CI / Deploy to server (push) Successful in 8s
feat(clipping): add title requirement check
2026-08-19 18:34:11 +01:00

26 lines
927 B
TypeScript

import clsx from "clsx";
import { type Dispatch, type SetStateAction } from "react";
import type { VideoMetadata } from "../../utils/types.ts";
type Props = {
setMetadata: Dispatch<SetStateAction<VideoMetadata>>;
className?: string;
};
const MetadataBox = ({ setMetadata, className }: Props) => (
<div className={clsx("flex flex-col content-between p-6 gap-2", className)}>
<p className="w-full font-body text-text-strong font-bold text-sm">
Title <span className="text-error">*</span>
</p>
<input
type="text"
required
placeholder="Enter title"
onChange={(e) => setMetadata(prev => ({ ...prev, title: e.target.value }))}
className="border border-hairline bg-fields rounded-md w-full p-2 text-sm focus:outline-none focus:ring-2 focus:ring-muted transition-colors"
/>
</div>
);
export default MetadataBox;