shuashuai commented on code in PR #1234:
URL: https://github.com/apache/answer/pull/1234#discussion_r1919727414


##########
ui/src/pages/Install/components/FourthStep/index.tsx:
##########
@@ -295,21 +298,42 @@ const Index: FC<Props> = ({ visible, data, 
changeCallback, nextCallback }) => {
 
       <Form.Group controlId="password" className="mb-3">
         <Form.Label>{t('admin_password.label')}</Form.Label>
-        <Form.Control
-          required
-          type="password"
-          value={data.password.value}
-          isInvalid={data.password.isInvalid}
-          onChange={(e) => {
-            changeCallback({
-              password: {
-                value: e.target.value,
-                isInvalid: false,
-                errorMsg: '',
-              },
-            });
-          }}
-        />
+        <div className="position-relative">
+          <Form.Control
+            required
+            type={showPassword ? 'text' : 'password'}
+            value={data.password.value}
+            isInvalid={data.password.isInvalid}
+            style={{ paddingRight: '45px' }}
+            onChange={(e) => {
+              changeCallback({
+                password: {
+                  value: e.target.value,
+                  isInvalid: false,
+                  errorMsg: '',
+                },
+              });
+            }}
+          />
+          <button
+            type="button"
+            className="position-absolute top-50 translate-middle-y 
bg-transparent border-0"
+            style={{
+              cursor: 'pointer',
+              right: '12px',
+              padding: '4px',
+            }}

Review Comment:
   1. `padding: '4px'` can be replaced by class p-1
   2.  `cursor: 'pointer'` can be removed, the hover effect of button is curosr
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to