@@ -7,7 +7,10 @@ import { getDurationWithUnits } from "../../../Overview/SlotPerformance/Transact
77import type { SlotTransactions } from "../../../../api/types" ;
88import PctBar from "../PctBar" ;
99import { SlotDetailsSubSection } from "../SlotDetailsSubSection" ;
10- import { slotDetailsStatsPrimary } from "../../../../colors" ;
10+ import styles from "../detailedSlotStats.module.css" ;
11+ import clsx from "clsx" ;
12+ import MonoText from "../../../../components/MonoText" ;
13+ import { gridGapX , gridGapY } from "../consts" ;
1114
1215const initDurations = {
1316 preLoading : 0 ,
@@ -93,15 +96,15 @@ export default function CumulativeExecutionTimeStats() {
9396
9497 return (
9598 < SlotDetailsSubSection title = "Cumulative Execution Time" >
96- < Grid columns = "repeat(7, auto)" gapX = "2" gapY = "1" >
99+ < Grid columns = "repeat(7, auto)" gapX = { gridGapX } gapY = { gridGapY } >
97100 < div />
98- < Text style = { { color : slotDetailsStatsPrimary , gridColumn : "span 2" } } >
101+ < Text className = { styles . tableHeader } style = { { gridColumn : "span 2" } } >
99102 Success+Landed
100103 </ Text >
101- < Text style = { { color : slotDetailsStatsPrimary , gridColumn : "span 2" } } >
104+ < Text className = { styles . tableHeader } style = { { gridColumn : "span 2" } } >
102105 Failed+Landed
103106 </ Text >
104- < Text style = { { color : slotDetailsStatsPrimary , gridColumn : "span 2" } } >
107+ < Text className = { styles . tableHeader } style = { { gridColumn : "span 2" } } >
105108 Unlanded
106109 </ Text >
107110 < Row
@@ -169,8 +172,6 @@ function Row({
169172 max,
170173 isTotal,
171174} : RowProps ) {
172- const labelColor = isTotal ? "var(--gray-12)" : "var(--gray-11)" ;
173- const valueColor = isTotal ? "var(--gray-11)" : "var(--gray-10)" ;
174175 const landedSuccessColor = isTotal ? "#28684A" : "#174933" ;
175176 const landedFailedColor = isTotal ? "#8C333A" : "#611623" ;
176177 const unlandedColor = isTotal ? "#12677E" : "#004558" ;
@@ -181,23 +182,35 @@ function Row({
181182
182183 return (
183184 < >
184- < Text wrap = "nowrap" style = { { color : labelColor } } >
185+ < Text className = { clsx ( styles . tableRowLabel , isTotal && styles . total ) } >
185186 { label }
186187 </ Text >
187- < Text wrap = "nowrap" style = { { color : valueColor } } align = "right" >
188- { `${ landedSuccessUnits . value } ${ landedSuccessUnits . unit } ` }
188+ < Text
189+ className = { clsx ( styles . tableCellValue , isTotal && styles . total ) }
190+ align = "right"
191+ >
192+ { landedSuccessUnits . value }
193+ < MonoText > { landedSuccessUnits . unit } </ MonoText >
189194 </ Text >
190195 < PctBar
191196 value = { landedSuccess }
192197 total = { max }
193198 valueColor = { landedSuccessColor }
194199 />
195- < Text wrap = "nowrap" style = { { color : valueColor } } align = "right" >
196- { `${ landedFailedUnits . value } ${ landedFailedUnits . unit } ` }
200+ < Text
201+ className = { clsx ( styles . tableCellValue , isTotal && styles . total ) }
202+ align = "right"
203+ >
204+ { landedFailedUnits . value }
205+ < MonoText > { landedFailedUnits . unit } </ MonoText >
197206 </ Text >
198207 < PctBar value = { landedFailed } total = { max } valueColor = { landedFailedColor } />
199- < Text wrap = "nowrap" style = { { color : valueColor } } align = "right" >
200- { `${ unlandedUnits . value } ${ unlandedUnits . unit } ` }
208+ < Text
209+ className = { clsx ( styles . tableCellValue , isTotal && styles . total ) }
210+ align = "right"
211+ >
212+ { unlandedUnits . value }
213+ < MonoText > { unlandedUnits . unit } </ MonoText >
201214 </ Text >
202215 < PctBar value = { unlanded } total = { max } valueColor = { unlandedColor } />
203216 </ >
0 commit comments