visuddhinanda пре 2 година
родитељ
комит
31cde9f17d
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      dashboard/src/components/nut/users/SignIn.tsx

+ 6 - 1
dashboard/src/components/nut/users/SignIn.tsx

@@ -2,6 +2,7 @@ import { useIntl } from "react-intl";
 import { ProForm, ProFormText } from "@ant-design/pro-components";
 import { message } from "antd";
 import { useNavigate } from "react-router-dom";
+import { EyeInvisibleOutlined, EyeTwoTone } from "@ant-design/icons";
 
 import { useAppDispatch } from "../../../hooks";
 import { IUser, signIn, TO_HOME } from "../../../reducers/current-user";
@@ -70,9 +71,13 @@ const Widget = () => {
         />
       </ProForm.Group>
       <ProForm.Group>
-        <ProFormText
+        <ProFormText.Password
           width="md"
           name="password"
+          fieldProps={{
+            iconRender: (visible) =>
+              visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />,
+          }}
           required
           label={intl.formatMessage({
             id: "forms.fields.password.label",