Skip to content

Commit a2e6c77

Browse files
committed
issue #3241
Icon Alignment Issue in Password Field – Adjust Eye Icon Vertical Centering #3241 github-7373
1 parent edb5f72 commit a2e6c77

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.form__field {
2+
position: relative;
3+
margin-bottom: 20px;
4+
}
5+
6+
.form__input {
7+
width: 100%;
8+
padding: 10px;
9+
font-size: 16px;
10+
border: 1px solid #ccc;
11+
border-radius: 4px;
12+
}
13+
14+
.form__field__password {
15+
position: relative;
16+
}
17+
18+
.form__eye__icon {
19+
position: absolute;
20+
right: 10px; /* Align icon to the right */
21+
top: 50%; /* Vertically center the icon */
22+
transform: translateY(-50%); /* Adjust for centering */
23+
background: transparent;
24+
border: none;
25+
cursor: pointer;
26+
}
27+
28+
.form__eye__icon svg {
29+
font-size: 20px; /* Adjust size of the eye icon */
30+
}
31+

client/modules/User/components/LoginForm.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { AiOutlineEye, AiOutlineEyeInvisible } from 'react-icons/ai';
66
import Button from '../../../common/Button';
77
import { validateLogin } from '../../../utils/reduxFormUtils';
88
import { validateAndLoginUser } from '../actions';
9+
import './LoginForm.css'; // Added import for the CSS
910

1011
function LoginForm() {
1112
const { t } = useTranslation();
@@ -98,4 +99,4 @@ function LoginForm() {
9899
);
99100
}
100101

101-
export default LoginForm;
102+
export default LoginForm;

0 commit comments

Comments
 (0)