init project portal web

This commit is contained in:
Sweli Giri
2025-04-15 13:56:54 +07:00
parent 9a25243035
commit 8b15dcebf8
122 changed files with 13965 additions and 1 deletions

View File

@ -0,0 +1,27 @@
import { useState } from "react";
import { Eye, EyeOff } from "lucide-react";
import { Input } from "@/components/ui/input";
interface Props extends React.InputHTMLAttributes<HTMLInputElement> {}
const InputPassword = ({ ...props }: Props) => {
const [showPassword, setShowPassword] = useState(false);
return (
<div className="relative w-full">
<Input
type={showPassword ? "text" : "password"}
{...props}
/>
<button
type="button"
className="absolute inset-y-0 right-3 flex items-center text-gray-500"
onClick={() => setShowPassword((prev) => !prev)}
>
{showPassword ? <EyeOff size={20} /> : <Eye size={20} />}
</button>
</div>
);
};
export default InputPassword;