gorules / jdm-editor

JDM Editor is an open-source React component for crafting and designing JDM (JSON Decision model) files.
https://gorules.io
MIT License
90 stars 29 forks source link

theme token is overwritten #50

Closed CoreyCole closed 1 month ago

CoreyCole commented 1 month ago

https://github.com/gorules/jdm-editor/blob/master/packages/jdm-editor/src/theme.tsx#L37 Doesn't this clobber any token passed into the <JdmConfigProvider>? I am trying to set up a custom theme and my token changes have no effect. The light vs dark works.

maybe I am using it incorrectly?

const cnTheme: ThemeConfig = {
  mode: 'light',
  token: {
    colorPrimary: '#281305',
    colorFill: '#281305',
    colorTextLightSolid: '#281305',
    colorTextLabel: '#281305',
    colorTextDescription: '#281305',
    colorTextHeading: '#281305',
    colorTextPlaceholder: '#281305',
    colorFillContent: '#281305',
    colorFillContentHover: '#281305',
    colorIconHover: '#281305',
    colorHighlight: '#281305',
    controlItemBgHover: '#281305',
    controlItemBgActive: '#281305',
    controlItemBgActiveHover: '#281305',
  },
};
// ...

            <JdmConfigProvider theme={cnTheme}>
              <DecisionTable value={table} {...decisionTableProps} />
            </JdmConfigProvider>