File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,5 @@ const input = document.querySelector("input");
22const eye = document . querySelector ( "#eye-icon" ) ;
33
44eye . addEventListener ( "click" , ( ) => {
5- // if (input.type === "password") {
6- // input.type = "text";
7- // } else {
8- // input.type = "password";
9- // }
10-
11- // REFACTOR
125 input . type === "password" ? ( input . type = "text" ) : ( input . type = "password" ) ;
136} ) ;
Original file line number Diff line number Diff line change 1717 < div class ="container ">
1818 < input type ="password " placeholder ="Password " />
1919 < div class ="eye-container ">
20- < i class ="fa fa-eye " aria-hidden ="true " id ="eye-icon "> </ i >
20+ < svg width ="30 " height ="30 " class ="eye-open " id ="eye-icon " fill ="currentColor " viewBox ="0 0 24 24 " xmlns ="http://www.w3.org/2000/svg ">
21+ < path fill-rule ="evenodd " d ="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5ZM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5Zm-3-5c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3Z " clip-rule ="evenodd "> </ path >
22+ </ svg >
2123 </ div >
2224 </ div >
2325
You can’t perform that action at this time.
0 commit comments