Skip to content

Commit

Permalink
jdm-editor: theme.token fix (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyCole committed May 24, 2024
1 parent e52bd5a commit 0f81b1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jdm-editor/src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type JdmConfigProviderProps = {
};

export const JdmConfigProvider: React.FC<JdmConfigProviderProps> = ({
theme: { mode = 'light', ...theme } = {},
theme: { mode = 'light', token = {}, ...restTheme } = {},
prefixCls,
children,
}) => {
Expand All @@ -34,7 +34,7 @@ export const JdmConfigProvider: React.FC<JdmConfigProviderProps> = ({
}, [mode]);

return (
<ConfigProvider prefixCls={prefixCls} theme={{ ...theme, algorithm, token: { mode } }}>
<ConfigProvider prefixCls={prefixCls} theme={{ ...restTheme, algorithm, token: { ...token, mode } }}>
<GlobalCssVariables mode={mode} />
{children}
</ConfigProvider>
Expand Down

0 comments on commit 0f81b1d

Please sign in to comment.