@@ -38,24 +38,28 @@ export const mapFromSubgraphStatus = (status: string, isDisputed: boolean) => {
3838 return Status . ClearingPending ;
3939 }
4040} ;
41+
42+ const statusStyles : Record < Status , string > = {
43+ [ Status . RegistrationPending ] :
44+ "border-t-klerosUIComponentsPrimaryBlue bg-klerosUIComponentsMediumBlue [&_.front-color]:text-klerosUIComponentsPrimaryBlue [&_.dot::before]:bg-klerosUIComponentsPrimaryBlue" ,
45+ [ Status . ClearingPending ] :
46+ "border-t-klerosUIComponentsPrimaryBlue bg-klerosUIComponentsMediumBlue [&_.front-color]:text-klerosUIComponentsPrimaryBlue [&_.dot::before]:bg-klerosUIComponentsPrimaryBlue" ,
47+ [ Status . Disputed ] :
48+ "border-t-klerosUIComponentsSecondaryPurple bg-klerosUIComponentsMediumPurple [&_.front-color]:text-klerosUIComponentsSecondaryPurple [&_.dot::before]:bg-klerosUIComponentsSecondaryPurple" ,
49+ [ Status . Included ] :
50+ "border-t-klerosUIComponentsSuccess bg-klerosUIComponentsSuccessLight [&_.front-color]:text-klerosUIComponentsSuccess [&_.dot::before]:bg-klerosUIComponentsSuccess" ,
51+ [ Status . Removed ] :
52+ "border-t-klerosUIComponentsError bg-klerosUIComponentsErrorLight [&_.front-color]:text-klerosUIComponentsError [&_.dot::before]:bg-klerosUIComponentsError" ,
53+ } ;
54+
4155const StatusBanner : React . FC < IStatusBanner > = ( { status, isListView = false } ) => (
4256 < div
4357 className = { cn (
4458 "flex items-center justify-between px-6 rounded-t-[3px]" ,
4559 isListView ? "h-min" : "h-11" ,
4660 isListView && "p-0" ,
4761 "[&_.dot::before]:content-[''] [&_.dot::before]:inline-block [&_.dot::before]:h-2 [&_.dot::before]:w-2 [&_.dot::before]:rounded-[50%] [&_.dot::before]:mr-2" ,
48- ! isListView && [
49- "border-t-[5px]" ,
50- ( status === Status . RegistrationPending || status === Status . ClearingPending ) &&
51- "border-t-klerosUIComponentsPrimaryBlue bg-klerosUIComponentsMediumBlue [&_.front-color]:text-klerosUIComponentsPrimaryBlue [&_.dot::before]:bg-klerosUIComponentsPrimaryBlue" ,
52- status === Status . Disputed &&
53- "border-t-klerosUIComponentsSecondaryPurple bg-klerosUIComponentsMediumPurple [&_.front-color]:text-klerosUIComponentsSecondaryPurple [&_.dot::before]:bg-klerosUIComponentsSecondaryPurple" ,
54- status === Status . Included &&
55- "border-t-klerosUIComponentsSuccess bg-klerosUIComponentsSuccessLight [&_.front-color]:text-klerosUIComponentsSuccess [&_.dot::before]:bg-klerosUIComponentsSuccess" ,
56- status === Status . Removed &&
57- "border-t-klerosUIComponentsError bg-klerosUIComponentsErrorLight [&_.front-color]:text-klerosUIComponentsError [&_.dot::before]:bg-klerosUIComponentsError" ,
58- ]
62+ ! isListView && [ "border-t-[5px]" , statusStyles [ status ] ]
5963 ) }
6064 >
6165 < label className = "front-color dot" > { getStatusLabel ( status ) } </ label >
0 commit comments