refactor(status-page): tighten the refined-theme conversion
Apply review feedback: - Type the styles factory's return as a named RefinedStyles interface so the consumer no longer needs `as Function` / `as any` casts on factory entries - Lift toneColor / toneSoft to shared/overallStatus alongside the existing OverallTone type — the next three themes will need the same mapping - Reuse heatLevel() in the legacy classPrefix branch of ThemedInfrastructure so both API paths share one threshold table - Memoize the styles map in RefinedStatusPage so MUI's sx processor sees referential equality across renders that don't actually change tokens - Make the dual-API gate in ThemedHeatmap / ThemedHistogram require ALL relevant sx props together so a partial migration can't silently fall back to the legacy class path
This commit is contained in:
1 parent
163f5ec1ec
commit
b95d8886b9
6 files changed
+92
-68
No files matched your search
@@ -30,7 +30,7 @@ const classify = (check: CheckSnapshot): Exclude<HeatCellKind, "empty"> => {
|
||||
|
||||
export const ThemedHeatmap = ({ checks, containerSx, cellSx, classPrefix }: Props) => {
|
||||
const { t } = useTranslation();
|
||||
const useSxApi = Boolean(cellSx);
|
||||
const useSxApi = Boolean(containerSx && cellSx);
|
||||
|
||||
const source = checks.slice(0, CELLS).reverse();
|
||||
const padded: (CheckSnapshot | null)[] = [
|
||||
|
||||
Reference in new issue
Block a user