diff --git a/packages/javascript/src/models/v2/flow-meta-v2.ts b/packages/javascript/src/models/v2/flow-meta-v2.ts index e0419b5e..c2382497 100644 --- a/packages/javascript/src/models/v2/flow-meta-v2.ts +++ b/packages/javascript/src/models/v2/flow-meta-v2.ts @@ -165,7 +165,7 @@ export interface FlowMetaThemeColors { */ export interface FlowMetaThemeColorScheme { /** All colors defined for this color scheme (light or dark) */ - colors: FlowMetaThemeColors; + palette: FlowMetaThemeColors; } /** diff --git a/packages/react/src/utils/v2/buildThemeConfigFromFlowMeta.ts b/packages/react/src/utils/v2/buildThemeConfigFromFlowMeta.ts index 6bb27bba..a56e734a 100644 --- a/packages/react/src/utils/v2/buildThemeConfigFromFlowMeta.ts +++ b/packages/react/src/utils/v2/buildThemeConfigFromFlowMeta.ts @@ -45,28 +45,28 @@ const buildThemeConfigFromFlowMeta = ( // base-theme defaults inside `createTheme`. let colors: RecursivePartial | undefined; - if (scheme?.colors) { + if (scheme?.palette) { colors = {}; - if (scheme.colors.primary) { - colors.primary = scheme.colors.primary; + if (scheme.palette.primary) { + colors.primary = scheme.palette.primary; } - if (scheme.colors.secondary) { - colors.secondary = scheme.colors.secondary; + if (scheme.palette.secondary) { + colors.secondary = scheme.palette.secondary; } - if (scheme.colors.text) { - colors.text = scheme.colors.text; + if (scheme.palette.text) { + colors.text = scheme.palette.text; } // Build background incrementally to avoid replacing the full base object. - if (scheme.colors.background) { + if (scheme.palette.background) { const bg: RecursivePartial = {}; - if (scheme.colors.background.default) { - bg.body = {main: scheme.colors.background.default}; + if (scheme.palette.background.default) { + bg.body = {main: scheme.palette.background.default}; } - if (scheme.colors.background.paper) { - bg.surface = scheme.colors.background.paper; + if (scheme.palette.background.paper) { + bg.surface = scheme.palette.background.paper; } if (Object.keys(bg).length > 0) {