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

[Question] 使用 registerColor 方法注册自定义 Token #3457

Open
weberFlying opened this issue Mar 27, 2024 · 3 comments
Open

[Question] 使用 registerColor 方法注册自定义 Token #3457

weberFlying opened this issue Mar 27, 2024 · 3 comments
Labels
💬 question Further information is requested

Comments

@weberFlying
Copy link

描述你的问题(Describe you question here)
https://opensumi.com/zh/docs/extension/develop/built-in-component
查看官网,关于自定义适配主题的组件,请问下按照官网步骤添加并导入文件后,并没有生效,请问下除了描述的操作外还需要做哪些操作,

@weberFlying weberFlying added the 💬 question Further information is requested label Mar 27, 2024
@erha19
Copy link
Member

erha19 commented Mar 27, 2024

@weberFlying 这块逻辑目前是自执行的,如果无效,看一下是否能在示例仓库里面复现问题并提供一下相应代码方便我们排查。

@weberFlying
Copy link
Author

weberFlying commented Mar 28, 2024

@erha19
感谢回复!
在这里添加了一点测试文件,发现还是看不到效果,不知道哪些写错了还是什么原因;
https://github.com/weberFlying/opensumi-module-samples/tree/develop

另外想问下,modules/use-antd/browser/components.view.tsx 里面 <h1 className={styles.title}>Button</h1> 这一行的使用是否是应用了‘./components.module.less’里面的

.title {
  color: var(--foreground);
}

DOM节点上没有看到class=""

@erha19
Copy link
Member

erha19 commented Apr 9, 2024

@weberFlying 示例内的代码可能存在问题,你这里的例子把 h1 样式放到 .title 里面应该就可以了:

- h1 {
+ .title {
  color: var(--kt--toolbarButton--selectionForeground);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants