-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathicons.tsx
More file actions
65 lines (60 loc) · 1.38 KB
/
Copy pathicons.tsx
File metadata and controls
65 lines (60 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"use client";
import { rem, ThemeIcon } from "@mantine/core";
import { IconCheck, IconProgress, IconX } from "@tabler/icons-react";
import { useTranslation } from "@/app/translate";
export function IconDone() {
const { t } = useTranslation();
return (
<ThemeIcon
size={20}
radius="xl"
color="var(--mantine-color-green-9)"
title={t("compatibility.avm2.done")}
>
<IconCheck
color="white"
style={{ width: rem(12), height: rem(12) }}
stroke={4}
/>
</ThemeIcon>
);
}
export function IconStub() {
const { t } = useTranslation();
return (
<ThemeIcon size={20} radius="xl" title={t("compatibility.avm2.partial")}>
<IconProgress
color="#3c1518"
style={{ width: rem(12), height: rem(12) }}
stroke={4}
/>
</ThemeIcon>
);
}
export function IconMissing() {
const { t } = useTranslation();
return (
<ThemeIcon
size={20}
radius="xl"
color="#3c1518"
title={t("compatibility.avm2.missing")}
>
<IconX
color="white"
style={{ width: rem(12), height: rem(12) }}
stroke={4}
/>
</ThemeIcon>
);
}
export function ProgressIcon(type: "stub" | "missing" | "done") {
switch (type) {
case "stub":
return <IconStub />;
case "missing":
return <IconMissing />;
case "done":
return <IconDone />;
}
}