MCPcopy Create free account
hub / github.com/bjsi/incremental-everything / BucketRow

Function BucketRow

src/components/CardMemoryAnalyticsView.tsx:197–321  ·  view source on GitHub ↗
({
  b,
  isOverall,
  idx,
  isSubset,
}: {
  b: CardBucketStats;
  isOverall: boolean;
  idx: number;
  isSubset?: boolean;
})

Source from the content-addressed store, hash-verified

195
196// --- Table -----------------------------------------------------------------
197
198const cellStyle: React.CSSProperties = {
199 padding: '4px 5px',
200 fontSize: '10.5px',
201 lineHeight: 1.3,
202 whiteSpace: 'nowrap',
203 textAlign: 'right',
204};
205
206const headerCellStyle: React.CSSProperties = {
207 padding: '4px 5px',
208 fontSize: '9.5px',
209 fontWeight: 700,
210 textTransform: 'uppercase',
211 letterSpacing: '0.03em',
212 color: 'var(--rn-clr-content-tertiary)',
213 textAlign: 'right',
214 whiteSpace: 'nowrap',
215 cursor: 'help',
216};
217
218/**
219 * Where one column group ends and the next begins. The group header row alone
220 * could not carry this: its cells are centred over their span, so a wide group
221 * reads as a label floating somewhere above the numbers. The edge is drawn on
222 * the group header, the column header AND the body cells so a column can be
223 * traced to its group down the whole table.
224 */
225const GROUP_EDGE = '2px solid var(--rn-clr-background-tertiary)';
226
227/** Alternating tints, one per group, so adjacent groups never share a shade. */
228const groupTint = (idx: number): string =>
229 idx % 2 === 0 ? 'var(--rn-clr-background-secondary)' : 'var(--rn-clr-background-tertiary)';
230
231const groupHeaderStyle: React.CSSProperties = {
232 padding: '3px 5px',
233 fontSize: '9px',
234 fontWeight: 700,
235 textTransform: 'uppercase',
236 letterSpacing: '0.06em',
237 color: 'var(--rn-clr-content-secondary)',
238 textAlign: 'center',
239 background: 'var(--rn-clr-background-secondary)',
240 borderBottom: '1px solid var(--rn-clr-background-tertiary)',
241 cursor: 'help',
242};
243
244function BucketRow({
245 b,
246 isOverall,
247 idx,
248 isSubset,
249}: {
250 b: CardBucketStats;
251 isOverall: boolean;
252 idx: number;
253 isSubset?: boolean;
254}) {

Callers

nothing calls this directly

Calls 9

fmtNumFunction · 0.85
fmtTimeShortFunction · 0.85
gradeColorFunction · 0.85
fmtStabilityDaysFunction · 0.85
fmtPctFunction · 0.70
fmtIntFunction · 0.70
retentionColorFunction · 0.70
rDevColorFunction · 0.70
fmtPPFunction · 0.70

Tested by

no test coverage detected