Skip to content

Commit 059b0ea

Browse files
authored
Merge pull request #1680 from AletheiaFact/Change-all-icons-antd
Change all antd icons
2 parents aa865b3 + aafbdd9 commit 059b0ea

40 files changed

+213
-228
lines changed

src/components/AffixButton/AffixButton.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import {
2-
FileAddFilled,
3-
PlusCircleFilled,
4-
PlusOutlined,
5-
UserAddOutlined,
6-
} from "@ant-design/icons";
1+
import {
2+
NoteAdd,
3+
AddCircle,
4+
AddOutlined,
5+
PersonAddAlt1Outlined,
6+
Source,
7+
Report
8+
} from "@mui/icons-material";
79
import { useAtom } from "jotai";
810
import Cookies from "js-cookie";
911
import { Trans, useTranslation } from "next-i18next";
@@ -18,8 +20,6 @@ import Fab from "./Fab";
1820
import { NameSpaceEnum } from "../../types/Namespace";
1921
import { currentNameSpace } from "../../atoms/namespace";
2022
import { useAppSelector } from "../../store/store";
21-
import SourceIcon from "@mui/icons-material/Source";
22-
import ReportIcon from "@mui/icons-material/Report";
2323

2424
interface AffixButtonProps {
2525
personalitySlug?: string;
@@ -44,7 +44,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
4444
const { t } = useTranslation();
4545
const actions = [
4646
{
47-
icon: <UserAddOutlined />,
47+
icon: <PersonAddAlt1Outlined />,
4848
tooltip: t("affix:affixButtonCreatePersonality"),
4949
href:
5050
nameSpace !== NameSpaceEnum.Main
@@ -61,7 +61,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
6161
userRole !== "regular" &&
6262
actions.push(
6363
{
64-
icon: <FileAddFilled />,
64+
icon: <NoteAdd />,
6565
tooltip: t("affix:affixButtonCreateClaim"),
6666
href:
6767
nameSpace !== NameSpaceEnum.Main
@@ -70,7 +70,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
7070
dataCy: "testFloatButtonAddClaim",
7171
},
7272
{
73-
icon: <SourceIcon />,
73+
icon: <Source />,
7474
tooltip: t("affix:affixButtonCreateVerifiedSources"),
7575
href:
7676
nameSpace !== NameSpaceEnum.Main
@@ -79,7 +79,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
7979
dataCy: "testFloatButtonAddSources",
8080
},
8181
{
82-
icon: <ReportIcon />,
82+
icon: <Report />,
8383
tooltip: t("affix:affixButtonCreateVerificationRequest"),
8484
href:
8585
nameSpace !== NameSpaceEnum.Main
@@ -157,10 +157,8 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
157157
onClick={handleClick}
158158
data-cy={"testFloatButton"}
159159
icon={
160-
<PlusOutlined
161-
style={{
162-
fontSize: "27px",
163-
}}
160+
<AddOutlined
161+
fontSize="large"
164162
/>
165163
}
166164
/>
@@ -196,7 +194,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
196194
>
197195
<Trans
198196
i18nKey={"tutorial:modalContent"}
199-
components={[<PlusCircleFilled key={"icon"} />]}
197+
components={[<AddCircle style={{marginBottom:"-5px",fontSize:"18px"}} key={"icon"} />]}
200198
/>
201199
</p>
202200

src/components/AffixButton/AffixCTAButton.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { useEffect, useState } from "react";
2-
3-
import { CloseOutlined, QuestionCircleOutlined } from "@ant-design/icons";
2+
import { CloseOutlined, HelpOutlineOutlined } from "@mui/icons-material";
43
import Fab from "../AffixButton/Fab";
54
import { AletheiaModal } from "../Modal/AletheiaModal.style";
65
import Banner from "../SentenceReport/Banner";
@@ -9,11 +8,11 @@ import Cookies from "js-cookie";
98
import CtaAnimation from "../CtaAnimation";
109
import { Tooltip } from "antd";
1110
import colors from "../../styles/colors";
12-
import { t } from "i18next";
1311
import { trackUmamiEvent } from "../../lib/umami";
1412
import { useAppSelector } from "../../store/store";
1513

1614
const CloseIcon = () => {
15+
const { t } = useTranslation();
1716
return (
1817
<Tooltip
1918
title={t("affix:AffixCloseTooltip")}
@@ -22,13 +21,7 @@ const CloseIcon = () => {
2221
color={colors.white}
2322
overlayInnerStyle={{ color: colors.black }}
2423
>
25-
<CloseOutlined
26-
style={{
27-
marginTop: 20,
28-
paddingBottom: 20,
29-
height: 20,
30-
}}
31-
/>
24+
<CloseOutlined style={{margin:"10px", color:colors.white}} />
3225
</Tooltip>
3326
);
3427
};
@@ -85,10 +78,8 @@ const AffixCTAButton = ({ copilotDrawerWidth }) => {
8578
onClick={handleCTAClick}
8679
data-cy={"testCTAFloatButton"}
8780
icon={
88-
<QuestionCircleOutlined
89-
style={{
90-
fontSize: "24px",
91-
}}
81+
<HelpOutlineOutlined
82+
fontSize="medium"
9283
/>
9384
}
9485
/>

src/components/BackButton.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useTranslation } from "next-i18next";
22
import React, { CSSProperties } from "react";
3-
import { ArrowLeftOutlined } from "@ant-design/icons";
3+
import { ArrowBackOutlined } from "@mui/icons-material";
44
import { useRouter } from "next/router";
55
import colors from "../styles/colors";
66

@@ -13,6 +13,8 @@ function BackButton({ style, callback }: { style?: CSSProperties; callback?: ()
1313
return (
1414
<a
1515
style={{
16+
display:"flex",
17+
alignContent:"center",
1618
fontWeight: "bold",
1719
color: colors.secondary,
1820
...style
@@ -28,7 +30,7 @@ function BackButton({ style, callback }: { style?: CSSProperties; callback?: ()
2830
}
2931
}}
3032
>
31-
<ArrowLeftOutlined /> {t("common:back_button")}
33+
<ArrowBackOutlined fontSize="small"/> {t("common:back_button")}
3234
</a>
3335
);
3436
} else {

src/components/Claim/CreateClaim/ClaimSelectType.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import {
2-
FileOutlined,
3-
PictureOutlined,
4-
VideoCameraOutlined,
5-
} from "@ant-design/icons";
1+
import {
2+
InsertDriveFileOutlined,
3+
PhotoSizeSelectActualOutlined,
4+
VideocamOutlined
5+
} from "@mui/icons-material";
66
import { Grid } from "@mui/material";
77
import { useAtom } from "jotai";
88
import { useTranslation } from "next-i18next";
@@ -16,12 +16,13 @@ import AletheiaButton from "../../Button";
1616
const ClaimSelectType = () => {
1717
const [, send] = useAtom(createClaimMachineAtom);
1818
const { t } = useTranslation();
19+
const Sizeicon = { fontSize:"22px", margin:"0 5 5 0"};
1920

2021
const icons = {
21-
[ContentModelEnum.Image]: <PictureOutlined />,
22-
[ContentModelEnum.Speech]: <FileOutlined />,
23-
[ContentModelEnum.Debate]: <VideoCameraOutlined />,
24-
[ContentModelEnum.Unattributed]: <FileOutlined />,
22+
[ContentModelEnum.Image]: <PhotoSizeSelectActualOutlined style={Sizeicon}/>,
23+
[ContentModelEnum.Speech]: <InsertDriveFileOutlined style={Sizeicon}/>,
24+
[ContentModelEnum.Debate]: <VideocamOutlined style={Sizeicon}/>,
25+
[ContentModelEnum.Unattributed]: <InsertDriveFileOutlined style={Sizeicon}/>,
2526
};
2627

2728
const handleClickStart = (event) => {
@@ -64,7 +65,7 @@ const ClaimSelectType = () => {
6465
{Object.keys(ContentModelEnum).map((key) => (
6566
<AletheiaButton
6667
onClick={() => handleClickStart(key)}
67-
style={{ textTransform: "uppercase" }}
68+
style={{ gap:"10px",textTransform: "uppercase" }}
6869
data-cy={`testSelectType${key}`}
6970
key={key}
7071
>

src/components/Claim/SentencePopover.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InfoCircleOutlined, SecurityScanOutlined } from "@ant-design/icons";
1+
import { InfoOutlined, SecurityOutlined } from "@mui/icons-material";
22
import { Popover } from "antd";
33
import React from "react";
44
import colors from "../../styles/colors";
@@ -18,14 +18,14 @@ const SentencePopover = () => {
1818
gap: 4,
1919
}}
2020
>
21-
<SecurityScanOutlined style={{ fontSize: 20 }} />
21+
<SecurityOutlined fontSize="small" />
2222
{t("reviewTask:sentenceInfo")}
2323
</span>
2424
);
2525

2626
return (
2727
<Popover placement="top" content={content} trigger="hover">
28-
<InfoCircleOutlined style={{ color: colors.neutralSecondary }} />
28+
<InfoOutlined style={{fontSize:"18px", color: colors.neutralSecondary }} />
2929
</Popover>
3030
);
3131
};

src/components/ClaimReview/ClaimReviewDrawer.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
ArrowLeftOutlined,
3-
ExclamationCircleOutlined,
4-
} from "@ant-design/icons";
1+
import { ArrowBackOutlined, ErrorOutlineOutlined } from "@mui/icons-material";
52
import { Grid } from "@mui/material"
63
import { useTranslation } from "next-i18next";
74
import React, { useEffect, useState } from "react";
@@ -73,7 +70,7 @@ const ClaimReviewDrawer = () => {
7370
>
7471
<Grid item style={{ display: "flex", gap: 32 }}>
7572
<AletheiaButton
76-
icon={<ArrowLeftOutlined />}
73+
icon={<ArrowBackOutlined style={{marginRight:"10px"}} fontSize="small"/>}
7774
onClick={() =>
7875
dispatch(actions.closeReviewDrawer())
7976
}
@@ -111,9 +108,10 @@ const ClaimReviewDrawer = () => {
111108
justifyContent: "center",
112109
gap: 8,
113110
alignItems: "center",
111+
marginTop:"10px"
114112
}}
115113
>
116-
<ExclamationCircleOutlined
114+
<ErrorOutlineOutlined
117115
style={{
118116
fontSize: 16,
119117
color: colors.secondary,

src/components/Collaborative/Components/LinkToolBar/Dialog/InsertSourceForm.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import AletheiaInput from "../../../../AletheiaInput";
33
import AletheiaButton from "../../../../Button";
4-
import { DeleteOutlined, PlusOutlined } from "@ant-design/icons";
4+
import { DeleteOutlined, AddOutlined } from "@mui/icons-material";
55
import colors from "../../../../../styles/colors";
66

77
const InsertSourceForm = ({
@@ -44,7 +44,7 @@ const InsertSourceForm = ({
4444
}}
4545
data-cy="testClaimReviewSourcesButton"
4646
>
47-
<PlusOutlined />
47+
<AddOutlined fontSize="small"/>
4848
</AletheiaButton>
4949
{activeLink && (
5050
<AletheiaButton
@@ -59,7 +59,7 @@ const InsertSourceForm = ({
5959
boxShadow: "0px 2px 2px rgba(0, 0, 0, 0.4)",
6060
}}
6161
>
62-
<DeleteOutlined />
62+
<DeleteOutlined fontSize="small"/>
6363
</AletheiaButton>
6464
)}
6565
</div>

src/components/Collaborative/Components/LinkToolBar/Dialog/SourceDialogHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CloseOutlined } from "@ant-design/icons";
1+
import { CloseOutlined } from "@mui/icons-material";
22
import { useTranslation } from "next-i18next";
33
import React from "react";
44

src/components/Collaborative/Components/Source/EditorSourceListItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Col, Spin } from "antd";
22
import React, { useEffect, useMemo, useState } from "react";
3-
import { LoadingOutlined } from "@ant-design/icons";
3+
import { CircularProgress } from "@mui/material";
44
import MoreVertIcon from "@mui/icons-material/MoreVert";
55
import EditorSourcePopover from "./EditorSourcePopover";
66
import colors from "../../../../styles/colors";
@@ -52,7 +52,7 @@ const EditorSourceListItem = ({ node, sup, source }: EditorSouceListProps) => {
5252
<Spin
5353
spinning={isLoading}
5454
indicator={
55-
<LoadingOutlined
55+
<CircularProgress
5656
style={{
5757
color:
5858
nameSpace === NameSpaceEnum.Main

src/components/Collaborative/Form/QuestionCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useCallback, useContext } from "react";
22
import { Grid } from "@mui/material";
33
import Button from "../../Button";
44
import { useCommands } from "@remirror/react";
5-
import { DeleteOutlined } from "@ant-design/icons";
5+
import { DeleteOutlined } from "@mui/icons-material";
66
import { useTranslation } from "next-i18next";
77
import { ReviewTaskMachineContext } from "../../../machines/reviewTask/ReviewTaskMachineProvider";
88
import { reviewingSelector } from "../../../machines/reviewTask/selectors";
@@ -41,7 +41,7 @@ const QuestionCard = ({ forwardRef, node, initialPosition }) => {
4141
disabled={editable}
4242
data-cy="testClaimReviewquestionsRemove1"
4343
>
44-
<DeleteOutlined />
44+
<DeleteOutlined fontSize="small"/>
4545
</Button>
4646
</Grid>
4747
}

0 commit comments

Comments
 (0)