@@ -6,7 +6,10 @@ import { useMemo } from "react";
66import { getDurationWithUnits } from "../../../Overview/SlotPerformance/TransactionBarsCard/chartUtils" ;
77import PctBar from "../PctBar" ;
88import { SlotDetailsSubSection } from "../SlotDetailsSubSection" ;
9- import { slotDetailsStatsPrimary } from "../../../../colors" ;
9+ import styles from "../detailedSlotStats.module.css" ;
10+ import clsx from "clsx" ;
11+ import MonoText from "../../../../components/MonoText" ;
12+ import { gridGapX , gridGapY } from "../consts" ;
1013import {
1114 getTxnBundleStats ,
1215 getTxnStateDurations ,
@@ -85,15 +88,15 @@ export default function CumulativeExecutionTimeStats() {
8588
8689 return (
8790 < SlotDetailsSubSection title = "Cumulative Execution Time" >
88- < Grid columns = "repeat(7, auto)" gapX = "2" gapY = "1" >
91+ < Grid columns = "repeat(7, auto)" gapX = { gridGapX } gapY = { gridGapY } >
8992 < div />
90- < Text style = { { color : slotDetailsStatsPrimary , gridColumn : "span 2" } } >
93+ < Text className = { styles . tableHeader } style = { { gridColumn : "span 2" } } >
9194 Success+Landed
9295 </ Text >
93- < Text style = { { color : slotDetailsStatsPrimary , gridColumn : "span 2" } } >
96+ < Text className = { styles . tableHeader } style = { { gridColumn : "span 2" } } >
9497 Failed+Landed
9598 </ Text >
96- < Text style = { { color : slotDetailsStatsPrimary , gridColumn : "span 2" } } >
99+ < Text className = { styles . tableHeader } style = { { gridColumn : "span 2" } } >
97100 Unlanded
98101 </ Text >
99102 < Row
@@ -161,8 +164,6 @@ function Row({
161164 max,
162165 isTotal,
163166} : RowProps ) {
164- const labelColor = isTotal ? "var(--gray-12)" : "var(--gray-11)" ;
165- const valueColor = isTotal ? "var(--gray-11)" : "var(--gray-10)" ;
166167 const landedSuccessColor = isTotal ? "#28684A" : "#174933" ;
167168 const landedFailedColor = isTotal ? "#8C333A" : "#611623" ;
168169 const unlandedColor = isTotal ? "#12677E" : "#004558" ;
@@ -173,23 +174,35 @@ function Row({
173174
174175 return (
175176 < >
176- < Text wrap = "nowrap" style = { { color : labelColor } } >
177+ < Text className = { clsx ( styles . tableRowLabel , isTotal && styles . total ) } >
177178 { label }
178179 </ Text >
179- < Text wrap = "nowrap" style = { { color : valueColor } } align = "right" >
180- { `${ landedSuccessUnits . value } ${ landedSuccessUnits . unit } ` }
180+ < Text
181+ className = { clsx ( styles . tableCellValue , isTotal && styles . total ) }
182+ align = "right"
183+ >
184+ { landedSuccessUnits . value }
185+ < MonoText > { landedSuccessUnits . unit } </ MonoText >
181186 </ Text >
182187 < PctBar
183188 value = { landedSuccess }
184189 total = { max }
185190 valueColor = { landedSuccessColor }
186191 />
187- < Text wrap = "nowrap" style = { { color : valueColor } } align = "right" >
188- { `${ landedFailedUnits . value } ${ landedFailedUnits . unit } ` }
192+ < Text
193+ className = { clsx ( styles . tableCellValue , isTotal && styles . total ) }
194+ align = "right"
195+ >
196+ { landedFailedUnits . value }
197+ < MonoText > { landedFailedUnits . unit } </ MonoText >
189198 </ Text >
190199 < PctBar value = { landedFailed } total = { max } valueColor = { landedFailedColor } />
191- < Text wrap = "nowrap" style = { { color : valueColor } } align = "right" >
192- { `${ unlandedUnits . value } ${ unlandedUnits . unit } ` }
200+ < Text
201+ className = { clsx ( styles . tableCellValue , isTotal && styles . total ) }
202+ align = "right"
203+ >
204+ { unlandedUnits . value }
205+ < MonoText > { unlandedUnits . unit } </ MonoText >
193206 </ Text >
194207 < PctBar value = { unlanded } total = { max } valueColor = { unlandedColor } />
195208 </ >
0 commit comments