Skip to content

Commit

Permalink
docs(catalog): fix material color utilities version skew
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 542689312
  • Loading branch information
Elliott Marquez authored and copybara-github committed Jun 22, 2023
1 parent 3f22ed0 commit 39af025
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion catalog/src/utils/material-color-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import type {Theme} from '../types/color-events.js';

import {applyThemeString} from './apply-theme-string.js';

interface WithTint {
surfaceTint: typeof MaterialDynamicColors.background;
surfaceTintColor: typeof MaterialDynamicColors.background;
}

/**
* A Mapping of color token name to MCU HCT color function generator.
*/
Expand All @@ -33,7 +38,9 @@ const materialColors = {
'outline-variant': MaterialDynamicColors.outlineVariant,
shadow: MaterialDynamicColors.shadow,
scrim: MaterialDynamicColors.scrim,
'surface-tint': MaterialDynamicColors.surfaceTint,
// TODO(b/288481318): clean up once MCU 0.2.7 is published on NPM.
'surface-tint': (MaterialDynamicColors as unknown as WithTint).surfaceTint ||
(MaterialDynamicColors as unknown as WithTint).surfaceTintColor,
primary: MaterialDynamicColors.primary,
'on-primary': MaterialDynamicColors.onPrimary,
'primary-container': MaterialDynamicColors.primaryContainer,
Expand Down

0 comments on commit 39af025

Please sign in to comment.