({
b,
isOverall,
idx,
isSubset,
}: {
b: CardBucketStats;
isOverall: boolean;
idx: number;
isSubset?: boolean;
})
| 195 | |
| 196 | // --- Table ----------------------------------------------------------------- |
| 197 | |
| 198 | const cellStyle: React.CSSProperties = { |
| 199 | padding: '4px 5px', |
| 200 | fontSize: '10.5px', |
| 201 | lineHeight: 1.3, |
| 202 | whiteSpace: 'nowrap', |
| 203 | textAlign: 'right', |
| 204 | }; |
| 205 | |
| 206 | const 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 | */ |
| 225 | const GROUP_EDGE = '2px solid var(--rn-clr-background-tertiary)'; |
| 226 | |
| 227 | /** Alternating tints, one per group, so adjacent groups never share a shade. */ |
| 228 | const groupTint = (idx: number): string => |
| 229 | idx % 2 === 0 ? 'var(--rn-clr-background-secondary)' : 'var(--rn-clr-background-tertiary)'; |
| 230 | |
| 231 | const 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 | |
| 244 | function BucketRow({ |
| 245 | b, |
| 246 | isOverall, |
| 247 | idx, |
| 248 | isSubset, |
| 249 | }: { |
| 250 | b: CardBucketStats; |
| 251 | isOverall: boolean; |
| 252 | idx: number; |
| 253 | isSubset?: boolean; |
| 254 | }) { |
nothing calls this directly
no test coverage detected