Skip to content

feat: use dtinsight/react-icons replace ant-design/icons #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dumi/pages/index/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { GithubOutlined } from '@ant-design/icons';
import { Button } from 'antd';
import { Helmet, Link } from 'dumi';

import GithubOutlined from '../../theme/common/GithubOutlined';
import './index.scss';

export default function Homepage() {
Expand Down
18 changes: 18 additions & 0 deletions .dumi/theme/common/GithubOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';

const GithubOutlined = () => {
return (
<span className="anticon">
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 1024 1024"
>
<path d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0 1 38.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" />
</svg>
</span>
);
};

export default GithubOutlined;
5 changes: 3 additions & 2 deletions .dumi/theme/slots/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { CloseOutlined, GithubOutlined, MenuOutlined } from '@ant-design/icons';
import { HamburgerOutlined, MenuCloseOutlined } from '@dtinsight/react-icons';
import { Button, Tooltip } from 'antd';
import { useRouteMeta } from 'dumi';
import LangSwitch from 'dumi/theme-default/slots/LangSwitch';
Expand All @@ -8,6 +8,7 @@ import Navbar from 'dumi/theme-default/slots/Navbar';
import RtlSwitch from 'dumi/theme-default/slots/RtlSwitch';
import SearchBar from 'dumi/theme-default/slots/SearchBar';

import GithubOutlined from '../../common/GithubOutlined';
import { useMobile } from '../../hooks';
import 'dumi/theme-default/slots/Header/index.less';
import './index.scss';
Expand Down Expand Up @@ -64,7 +65,7 @@ export default function Header() {
setShowMenu((v) => !v);
}}
>
{showMenu ? <CloseOutlined /> : <MenuOutlined />}
{showMenu ? <MenuCloseOutlined /> : <HamburgerOutlined />}
</button>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ module.exports = {
'@babel/polyfill/lib/noConflict': '<rootDir>/tests/styleMock.js',
'^lodash-es$': 'lodash',
'react-markdown': '<rootDir>/node_modules/react-markdown/react-markdown.min.js',
'@dtinsight/react-icons': '<rootDir>/tests/iconMock.js',
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@
"typescript": "~4.5.2"
},
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@dtinsight/dt-utils": "^1.3.1",
"@dtinsight/react-icons": "^1.0.0",
"@handsontable/react": "2.1.0",
"antd": "4.22.5",
"classnames": "^2.2.6",
Expand Down
Loading