Import source: vault/components/expiration-selector

Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
arsam
2026-09-18 23:17:35 +03:30
parent 33a6742411
commit e05602ba72
+32
View File
@@ -0,0 +1,32 @@
"use client";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { EXPIRATION_OPTIONS, Expiration } from "@/lib/types";
interface ExpirationSelectorProps {
value: Expiration;
onChange: (value: Expiration) => void;
}
export function ExpirationSelector({ value, onChange }: ExpirationSelectorProps) {
return (
<Select value={value} onValueChange={(v) => v && onChange(v as Expiration)}>
<SelectTrigger className="w-[180px] bg-muted/50 border-border/50">
<SelectValue placeholder="Expires" />
</SelectTrigger>
<SelectContent>
{EXPIRATION_OPTIONS.map((opt) => (
<SelectItem key={opt.value} value={opt.value}>
{opt.label}
</SelectItem>
))}
</SelectContent>
</Select>
);
}