Skip to content

Commit 109157c

Browse files
committed
Eye-Icon Alingnment
I make some little changes it is very begginer freindly issue . In which there are some protocols i have to follow dont use inline styling
1 parent edb5f72 commit 109157c

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

client/modules/User/components/LoginForm.jsx

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,29 @@ function LoginForm() {
6565
autoComplete="current-password"
6666
{...field.input}
6767
/>
68-
<button
69-
className="form__eye__icon"
70-
type="button"
71-
onClick={handleVisibility}
72-
aria-hidden="true"
73-
>
74-
{showPassword ? (
75-
<AiOutlineEyeInvisible />
76-
) : (
77-
<AiOutlineEye />
78-
)}
79-
</button>
80-
</div>
68+
69+
<button
70+
type="button"
71+
onClick={handleVisibility}
72+
aria-hidden="true"
73+
style={{
74+
background: 'none',
75+
border: 'none',
76+
cursor: 'pointer',
77+
display: 'flex',
78+
alignItems: 'center',
79+
justifyContent: 'center',
80+
padding: '0 10px ',
81+
paddingBottom:'16px' // Add padding
82+
}}
83+
>
84+
{showPassword ? (
85+
<AiOutlineEyeInvisible style={{ fontSize: '24px' }} /> // Add inline styles
86+
) : (
87+
<AiOutlineEye style={{ fontSize: '24px' }} /> // Add inline styles
88+
)}
89+
</button>
90+
</div>
8191
{field.meta.touched && field.meta.error && (
8292
<span className="form-error" aria-live="polite">
8393
{field.meta.error}

client/styles/components/_forms.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
font-size: 28px;
8282
position: absolute;
8383
right: 0px;
84-
top: 4px;
84+
padding-top: 3px;
8585
vertical-align: middle;
8686
}
8787

0 commit comments

Comments
 (0)