Skip to content

Commit c8a6bce

Browse files
authored
chore(icons): migrate to non-deprecated Phosphor exports (#208)
1 parent 9fb64a3 commit c8a6bce

4 files changed

Lines changed: 18 additions & 22 deletions

File tree

features/dashboard/audit-card.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
2-
CopySimple,
3-
DotsThree,
4-
PencilSimpleLine,
5-
Trash,
2+
CopySimpleIcon,
3+
DotsThreeIcon,
4+
PencilSimpleLineIcon,
5+
TrashIcon,
66
} from "@phosphor-icons/react";
77
import React from "react";
88

@@ -124,7 +124,7 @@ const DegreeAuditCard: React.FC<DegreeAuditCardProps> = ({
124124
}}
125125
aria-label="Audit options"
126126
>
127-
<DotsThree size={22} weight="bold" />
127+
<DotsThreeIcon size={22} weight="bold" />
128128
</button>
129129
</div>
130130
</div>
@@ -138,15 +138,15 @@ const DegreeAuditCard: React.FC<DegreeAuditCardProps> = ({
138138
className="flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-[15px] hover:bg-hover-bg"
139139
onClick={startRename}
140140
>
141-
<PencilSimpleLine size={20} className="shrink-0" />
141+
<PencilSimpleLineIcon size={20} className="shrink-0" />
142142
<span>Rename</span>
143143
</button>
144144
<button className="flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-[15px] hover:bg-hover-bg">
145-
<CopySimple size={20} className="shrink-0" />
145+
<CopySimpleIcon size={20} className="shrink-0" />
146146
<span>Duplicate</span>
147147
</button>
148148
<button className="flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-[15px] text-dap-delete hover:bg-hover-bg">
149-
<Trash size={20} className="shrink-0" />
149+
<TrashIcon size={20} className="shrink-0" />
150150
<span>Delete Audit</span>
151151
</button>
152152
</div>

features/dashboard/gpa-credit-cards.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HStack, VStack } from "@/components/ui/stack";
22
import type { GpaSummary } from "@/features/audit/audit-calculations";
33
import type { Status } from "@/domain/course";
4-
import { Check, X } from "@phosphor-icons/react";
4+
import { CheckIcon, XIcon } from "@phosphor-icons/react";
55

66
type FramedStatusIconState = "completed" | "not-started" | "in-progress";
77

@@ -36,13 +36,13 @@ const FramedStatusIcon = ({ state }: { state: FramedStatusIconState }) => {
3636
if (state === "completed") {
3737
return (
3838
<div className="bg-dap-plan-green-light mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded">
39-
<Check className="h-4 w-4 text-white" weight="bold" />
39+
<CheckIcon className="h-4 w-4 text-white" weight="bold" />
4040
</div>
4141
);
4242
}
4343
return (
4444
<div className="bg-dap-status-slate mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded">
45-
<X className="h-4 w-4 text-white" weight="bold" />
45+
<XIcon className="h-4 w-4 text-white" weight="bold" />
4646
</div>
4747
);
4848
};

features/dashboard/navbar.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ import { usePreferences } from "@/features/preferences/preferences-provider";
44
import { useAuditContext } from "@/features/audit/audit-provider";
55
import { getAuditDisplayName } from "@/domain/audit";
66
import { cn } from "@/lib/utils";
7-
import {
8-
ExportIcon,
9-
PencilIcon,
10-
Sidebar as SidebarIcon,
11-
} from "@phosphor-icons/react";
7+
import { ExportIcon, PencilIcon, SidebarIcon } from "@phosphor-icons/react";
128

139
const MAJOR_TAG_STYLES = [
1410
"bg-[#18a770] text-[#f3fff8]",

features/dashboard/requirement-breakdown.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { CATEGORY_COLORS, cn } from "@/lib/utils";
77
import {
88
CaretDownIcon,
99
CaretUpIcon,
10-
Check,
11-
Minus,
12-
X,
10+
CheckIcon,
11+
MinusIcon,
12+
XIcon,
1313
} from "@phosphor-icons/react";
1414
import { useState } from "react";
1515
import EyeIcon from "@/assets/svgs/Eye.svg";
@@ -82,20 +82,20 @@ const RequirementStatusIcon = ({
8282
if (state === "completed") {
8383
return (
8484
<div className="flex items-center justify-center w-6 h-6 bg-dap-plan-green-light rounded shrink-0 mt-0.5">
85-
<Check className="text-white w-4 h-4" weight="bold" />
85+
<CheckIcon className="text-white w-4 h-4" weight="bold" />
8686
</div>
8787
);
8888
}
8989
if (state === "not-started") {
9090
return (
9191
<div className="flex items-center justify-center w-6 h-6 bg-dap-status-slate rounded shrink-0 mt-0.5">
92-
<X className="text-white w-4 h-4" weight="bold" />
92+
<XIcon className="text-white w-4 h-4" weight="bold" />
9393
</div>
9494
);
9595
}
9696
return (
9797
<div className="flex items-center justify-center w-6 h-6 bg-dap-gray rounded shrink-0 mt-0.5">
98-
<Minus className="text-white w-4 h-4" weight="bold" />
98+
<MinusIcon className="text-white w-4 h-4" weight="bold" />
9999
</div>
100100
);
101101
};

0 commit comments

Comments
 (0)