File tree Expand file tree Collapse file tree 4 files changed +59
-58
lines changed
src/app/compatibility/avm2 Expand file tree Collapse file tree 4 files changed +59
-58
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ import classes from "./avm2.module.css";
14
14
import React from "react" ;
15
15
import {
16
16
ClassStatus ,
17
- ProgressIcon ,
18
17
displayedPercentage ,
19
18
} from "@/app/compatibility/avm2/report_utils" ;
19
+ import { ProgressIcon } from "@/app/compatibility/avm2/icons" ;
20
20
21
21
export function ClassBox ( props : ClassStatus ) {
22
22
const [ opened , { toggle } ] = useDisclosure ( false ) ;
Original file line number Diff line number Diff line change
1
+ import { rem , ThemeIcon } from "@mantine/core" ;
2
+ import { IconCheck , IconProgress , IconX } from "@tabler/icons-react" ;
3
+
4
+ export function IconDone ( ) {
5
+ return (
6
+ < ThemeIcon
7
+ size = { 20 }
8
+ radius = "xl"
9
+ color = "var(--mantine-color-green-9)"
10
+ title = "Done"
11
+ >
12
+ < IconCheck
13
+ color = "white"
14
+ style = { { width : rem ( 12 ) , height : rem ( 12 ) } }
15
+ stroke = { 4 }
16
+ />
17
+ </ ThemeIcon >
18
+ ) ;
19
+ }
20
+
21
+ export function IconStub ( ) {
22
+ return (
23
+ < ThemeIcon size = { 20 } radius = "xl" title = "Partial" >
24
+ < IconProgress
25
+ color = "#3c1518"
26
+ style = { { width : rem ( 12 ) , height : rem ( 12 ) } }
27
+ stroke = { 4 }
28
+ />
29
+ </ ThemeIcon >
30
+ ) ;
31
+ }
32
+
33
+ export function IconMissing ( ) {
34
+ return (
35
+ < ThemeIcon size = { 20 } radius = "xl" color = "#3c1518" title = "Missing" >
36
+ < IconX
37
+ color = "white"
38
+ style = { { width : rem ( 12 ) , height : rem ( 12 ) } }
39
+ stroke = { 4 }
40
+ />
41
+ </ ThemeIcon >
42
+ ) ;
43
+ }
44
+
45
+ export function ProgressIcon ( type : "stub" | "missing" | "done" ) {
46
+ switch ( type ) {
47
+ case "stub" :
48
+ return < IconStub /> ;
49
+ case "missing" :
50
+ return < IconMissing /> ;
51
+ case "done" :
52
+ return < IconDone /> ;
53
+ }
54
+ }
Original file line number Diff line number Diff line change @@ -13,11 +13,13 @@ import classes from "./avm2.module.css";
13
13
import { ClassBox } from "@/app/compatibility/avm2/class_box" ;
14
14
import {
15
15
getReportByNamespace ,
16
+ NamespaceStatus ,
17
+ } from "@/app/compatibility/avm2/report_utils" ;
18
+ import {
16
19
IconDone ,
17
20
IconMissing ,
18
21
IconStub ,
19
- NamespaceStatus ,
20
- } from "@/app/compatibility/avm2/report_utils" ;
22
+ } from "@/app/compatibility/avm2/icons" ;
21
23
import Link from "next/link" ;
22
24
23
25
function NamespaceBox ( props : NamespaceStatus ) {
Original file line number Diff line number Diff line change 1
- import { rem , ThemeIcon } from "@mantine/core" ;
2
- import { IconCheck , IconProgress , IconX } from "@tabler/icons-react" ;
3
1
import { fetchReport } from "@/app/downloads/github" ;
4
- import React from "react" ;
5
-
6
- export function IconDone ( ) {
7
- return (
8
- < ThemeIcon
9
- size = { 20 }
10
- radius = "xl"
11
- color = "var(--mantine-color-green-9)"
12
- title = "Done"
13
- >
14
- < IconCheck
15
- color = "white"
16
- style = { { width : rem ( 12 ) , height : rem ( 12 ) } }
17
- stroke = { 4 }
18
- />
19
- </ ThemeIcon >
20
- ) ;
21
- }
22
-
23
- export function IconStub ( ) {
24
- return (
25
- < ThemeIcon size = { 20 } radius = "xl" title = "Partial" >
26
- < IconProgress
27
- color = "#3c1518"
28
- style = { { width : rem ( 12 ) , height : rem ( 12 ) } }
29
- stroke = { 4 }
30
- />
31
- </ ThemeIcon >
32
- ) ;
33
- }
34
-
35
- export function IconMissing ( ) {
36
- return (
37
- < ThemeIcon size = { 20 } radius = "xl" color = "#3c1518" title = "Missing" >
38
- < IconX
39
- color = "white"
40
- style = { { width : rem ( 12 ) , height : rem ( 12 ) } }
41
- stroke = { 4 }
42
- />
43
- </ ThemeIcon >
44
- ) ;
45
- }
46
-
47
- export function ProgressIcon ( type : "stub" | "missing" | "done" ) {
48
- switch ( type ) {
49
- case "stub" :
50
- return < IconStub /> ;
51
- case "missing" :
52
- return < IconMissing /> ;
53
- case "done" :
54
- return < IconDone /> ;
55
- }
56
- }
57
2
58
3
export interface SummaryStatistics {
59
4
max_points : number ;
You can’t perform that action at this time.
0 commit comments