jianxiaoBai / react-json-editor-ui

React-based visual json editor.
https://jianxiaobai.github.io/react-json-editor-ui/
MIT License
46 stars 10 forks source link

Package Breaks Local Antd Theming #16

Open hiimdjango opened 1 year ago

hiimdjango commented 1 year ago

I'm trying to use this library in a project built with antd 4. For some reason, importing the component (without even importing the styles) breaks my theming and makes the app goes back to the default blue Color.

jianxiaoBai commented 1 year ago

Can you provide a demo?

hiimdjango commented 1 year ago

Sure, here's the repo that I made to illustrate the issue: https://github.com/hiimdjango/Antd-Json-Editor-Demo

If you comment out the code to add the JsonEditor the color is displaying correctly.

hiimdjango commented 1 year ago

I guess one way to fix it, is moving antd to peerDependencies in your package.json and remove that css import from your files.