@@ -35,32 +30,7 @@ function LoginForm({ className }) {
/>
diff --git a/src/components/ui/input/input.jsx b/src/components/ui/input/input.jsx
index c756a3e..0218b3e 100644
--- a/src/components/ui/input/input.jsx
+++ b/src/components/ui/input/input.jsx
@@ -1,13 +1,38 @@
import styles from "./input.module.css";
+import { useState } from "react";
-const TextInput = ({ placeholder, onChange, value, borderStyle, ...props }) => {
+const TextInput = ({ placeholder, onChange, value, borderStyle, password, className, ...props }) => {
+ const [showPassword, setShowPassword] = useState(false);
let inputBorderStyle = styles.square;
if (borderStyle === "square") inputBorderStyle = styles.square;
if(borderStyle === "rounded") inputBorderStyle = styles.rounded;
- return
+ const toggleShowPassword = () => {
+ setShowPassword(!showPassword);
+ };
+
+ if(password) return (
+
+
+
+
+ );
+
+ return
};
export default TextInput;
diff --git a/src/components/ui/input/input.module.css b/src/components/ui/input/input.module.css
index eaafa25..e56ef67 100644
--- a/src/components/ui/input/input.module.css
+++ b/src/components/ui/input/input.module.css
@@ -30,3 +30,23 @@
border-radius: 12px;
}
+.passwordContainer {
+ position: relative;
+ width: 100%;
+}
+
+.passwordInput {
+ width: 100%;
+}
+
+.passwordBtn {
+ position: absolute;
+ width: 30px;
+ right: 10px;
+ top: 50%;
+ transform: translateY(-50%);
+ background: none;
+ border: none;
+ cursor: pointer;
+ font-size: 16px;
+}