Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义组件中使用antd 组件, 组件不会使用预设好的主题色 #4585

Open
cgxdd opened this issue Feb 27, 2025 · 1 comment

Comments

@cgxdd
Copy link

cgxdd commented Feb 27, 2025

问题描述

使用React 创建自定义组件,在组件中使用antd的组件,但是不会使用全局的antd的主题色

重现链接

https://codesandbox.io/p/sandbox/jolly-engelbart-flcwx6?file=%2FApp.tsx%3A13%2C46

重现步骤

  1. 使用@antv/x6-react-shape 创建一个react 组件,
  2. 在组件中引用antd 的组件,比如: <Button type='primary'>Save</Button>
  3. 系统预设的antd 的主题色是#a8071a,但是Button 的背景色还是antd的默认背景色

预期行为

看到自定义组件中的button 的背景色是系统设置的主题色。

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox ...]
  • X6 版本: [2.11.1 ...]

屏幕截图或视频(可选)

Image

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Feb 27, 2025

👋 @cgxdd

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant