From 65ae52cdb769cd235caa3fbb0f3634a9076def6a Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:17:51 +0330 Subject: [PATCH] Import source: vault/components/privacy-toggle Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- vault/components/privacy-toggle.tsx | 74 +++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 vault/components/privacy-toggle.tsx diff --git a/vault/components/privacy-toggle.tsx b/vault/components/privacy-toggle.tsx new file mode 100644 index 0000000..ac82854 --- /dev/null +++ b/vault/components/privacy-toggle.tsx @@ -0,0 +1,74 @@ +"use client"; + +import { motion } from "framer-motion"; +import { Lock, Link as LinkIcon } from "lucide-react"; +import { Input } from "@/components/ui/input"; +import { PrivacyType } from "@/lib/types"; +import { cn } from "@/lib/utils"; + +interface PrivacyToggleProps { + value: PrivacyType; + onChange: (value: PrivacyType) => void; + password: string; + onPasswordChange: (password: string) => void; + passwordPlaceholder?: string; +} + +export function PrivacyToggle({ + value, + onChange, + password, + onPasswordChange, + passwordPlaceholder = "Enter a password...", +}: PrivacyToggleProps) { + return ( +
+
+ + +
+ + {value === "password" && ( + + onPasswordChange(e.target.value)} + className="mt-3 h-10 bg-muted/50 border-border/50 focus:border-amber-500/50" + /> + + )} +
+ ); +}