refactor: replace native select/input with shadcn
This commit is contained in:
@ -16,6 +16,14 @@ import {
|
|||||||
ContextMenuItem,
|
ContextMenuItem,
|
||||||
ContextMenuTrigger,
|
ContextMenuTrigger,
|
||||||
} from "../ui/context-menu";
|
} from "../ui/context-menu";
|
||||||
|
import { Input } from "../ui/input";
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from "../ui/select";
|
||||||
|
|
||||||
// MediaPanel lets users add, view, and drag media (images, videos, audio) into the project.
|
// MediaPanel lets users add, view, and drag media (images, videos, audio) into the project.
|
||||||
// You can upload files or drag them from your computer. Dragging from here to the timeline adds them to your video project.
|
// You can upload files or drag them from your computer. Dragging from here to the timeline adds them to your video project.
|
||||||
@ -237,20 +245,21 @@ export function MediaPanel() {
|
|||||||
{/* Button to add/upload media */}
|
{/* Button to add/upload media */}
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
{/* Search and filter controls */}
|
{/* Search and filter controls */}
|
||||||
<select
|
<Select value={mediaFilter} onValueChange={setMediaFilter}>
|
||||||
value={mediaFilter}
|
<SelectTrigger className="w-[80px] h-7 text-xs">
|
||||||
onChange={(e) => setMediaFilter(e.target.value)}
|
<SelectValue />
|
||||||
className="px-2 py-1 text-xs border rounded bg-background"
|
</SelectTrigger>
|
||||||
>
|
<SelectContent>
|
||||||
<option value="all">All</option>
|
<SelectItem value="all">All</SelectItem>
|
||||||
<option value="video">Video</option>
|
<SelectItem value="video">Video</SelectItem>
|
||||||
<option value="audio">Audio</option>
|
<SelectItem value="audio">Audio</SelectItem>
|
||||||
<option value="image">Image</option>
|
<SelectItem value="image">Image</SelectItem>
|
||||||
</select>
|
</SelectContent>
|
||||||
<input
|
</Select>
|
||||||
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Search media..."
|
placeholder="Search media..."
|
||||||
className="min-w-[60px] flex-1 px-2 py-1 text-xs border rounded bg-background"
|
className="min-w-[60px] flex-1 h-7 text-xs"
|
||||||
value={searchQuery}
|
value={searchQuery}
|
||||||
onChange={(e) => setSearchQuery(e.target.value)}
|
onChange={(e) => setSearchQuery(e.target.value)}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user