Просмотр исходного кода

用户卡片用户名颜色改为跟随系统

visuddhinanda 2 лет назад
Родитель
Сommit
f464c5694d
1 измененных файлов с 8 добавлено и 6 удалено
  1. 8 6
      dashboard/src/components/auth/SignInAvatar.tsx

+ 8 - 6
dashboard/src/components/auth/SignInAvatar.tsx

@@ -1,7 +1,7 @@
 import { useIntl } from "react-intl";
 import { useEffect, useState } from "react";
 import { Link, useNavigate } from "react-router-dom";
-import { Tooltip } from "antd";
+import { Tooltip, Typography } from "antd";
 import { Avatar } from "antd";
 import { Popover } from "antd";
 import { ProCard } from "@ant-design/pro-components";
@@ -15,6 +15,8 @@ import {
 import { useAppSelector } from "../../hooks";
 import { currentUser as _currentUser } from "../../reducers/current-user";
 
+const { Title, Paragraph } = Typography;
+
 const SignInAvatarWidget = () => {
   const intl = useIntl();
   const navigate = useNavigate();
@@ -63,14 +65,14 @@ const SignInAvatarWidget = () => {
           </Tooltip>,
         ]}
       >
-        <div>
-          <h2>{nickName}</h2>
-          <div style={{ textAlign: "right" }}>
+        <Paragraph>
+          <Title level={3}>{nickName}</Title>
+          <Paragraph style={{ textAlign: "right" }}>
             {intl.formatMessage({
               id: "buttons.welcome",
             })}
-          </div>
-        </div>
+          </Paragraph>
+        </Paragraph>
       </ProCard>
     </>
   );