@@ -28,26 +28,28 @@ interface ClassificationReportModalProps {
2828
2929const formatPercent = ( value : number ) : string => `${ ( value * 100 ) . toFixed ( 1 ) } %` ;
3030
31- const getCategoryColor = ( category : string ) : string => {
32- const colors : Record < string , string > = {
33- advertising : "red" ,
34- analytics : "blue" ,
35- social_media : "purple" ,
36- functional : "green" ,
37- essential : "cyan" ,
31+ type TagColor = "error" | "default" | "info" | "success" | "warning" | "corinth" | "minos" | "nectar" | "olive" | "sandstone" | "terracotta" | "marble" | "alert" | "caution" | "white" ;
32+
33+ const getCategoryColor = ( category : string ) : TagColor => {
34+ const colors : Record < string , TagColor > = {
35+ advertising : "error" ,
36+ analytics : "minos" ,
37+ social_media : "nectar" ,
38+ functional : "success" ,
39+ essential : "info" ,
3840 unknown : "default" ,
3941 } ;
4042 return colors [ category . toLowerCase ( ) ] || "default" ;
4143} ;
4244
43- const getConfidenceColor = ( score : number ) : string => {
45+ const getConfidenceColor = ( score : number ) : TagColor => {
4446 if ( score >= 4 ) {
45- return "green " ;
47+ return "success " ;
4648 }
4749 if ( score >= 3 ) {
48- return "orange " ;
50+ return "warning " ;
4951 }
50- return "red " ;
52+ return "error " ;
5153} ;
5254
5355export const ClassificationReportModal = ( {
@@ -200,7 +202,7 @@ const ReportContent = ({ report }: { report: WebsiteClassificationReport }) => {
200202 label : (
201203 < Space >
202204 < Text strong > Flagged resources</ Text >
203- < Tag color = "red " > { flagged_resources . length } </ Tag >
205+ < Tag color = "error " > { flagged_resources . length } </ Tag >
204206 </ Space >
205207 ) ,
206208 children : (
@@ -253,7 +255,7 @@ const ReportContent = ({ report }: { report: WebsiteClassificationReport }) => {
253255 render : ( score : number ) => score ? < Tag color = { getConfidenceColor ( score ) } > { score } </ Tag > : "-"
254256 } ,
255257 { title : "Compass" , dataIndex : "compass_matched" , key : "compass_matched" , width : 80 ,
256- render : ( matched : boolean ) => matched ? < Tag color = "green " > Yes</ Tag > : < Tag > No</ Tag >
258+ render : ( matched : boolean ) => matched ? < Tag color = "success " > Yes</ Tag > : < Tag > No</ Tag >
257259 } ,
258260 { title : "Rationale" , dataIndex : "rationale" , key : "rationale" , ellipsis : true ,
259261 render : ( text : string ) => (
0 commit comments