You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrap components in n-config-provider and provide custom colors. Then try to get the theme colors with useThemeVars.
Expected results (期望的结果)
Colors provided from useThemeVars are the same as provided from custom theme with n-config-provider.
Actual results (实际的结果)
useThemeVars returns just the default colors.
Remarks (补充说明)
First of all, thank you very much for your great work on Naive UI!
Unfortunately useThemeVars is unusable right now when using a custom theme. I would expect it to return the customized theme instead of just default values. I hope this can be fixed and I will be able to use the theme vars across my project with custom components! :)
Edit: I hope this is not the same bug as 1176. Unfortunately I don't speak Chinese :)
The text was updated successfully, but these errors were encountered:
@07akioni Hello, is this issue actually fixed ? In the CodeSandbox link provided by the author, and using the latest naiveui version (2.25.2), the themeVars values still don't match the themeOverrides values...
@07akioni Hello, is this issue actually fixed ? In the CodeSandbox link provided by the author, and using the latest naiveui version (2.25.2), the themeVars values still don't match the themeOverrides values...
The bug is fixed. In the demo the config provider and useThemeVars are used in the same component, which isn't correct.
TuSimple/naive-ui version (版本)
2.18.2
Vue version (Vue 版本)
3.2.6
Browser and its version (浏览器及其版本)
Chrome(93.0.4577.82)
System and its version (系统及其版本)
MacOS(11.5.2)
Node version (Node 版本)
Reappearance link (重现链接)
https://codesandbox.io/s/fragrant-glitter-6773d?file=/src/Demo.vue
Reappearance steps (重现步骤)
Wrap components in n-config-provider and provide custom colors. Then try to get the theme colors with useThemeVars.
Expected results (期望的结果)
Colors provided from useThemeVars are the same as provided from custom theme with n-config-provider.
Actual results (实际的结果)
useThemeVars returns just the default colors.
Remarks (补充说明)
First of all, thank you very much for your great work on Naive UI!
Unfortunately useThemeVars is unusable right now when using a custom theme. I would expect it to return the customized theme instead of just default values. I hope this can be fixed and I will be able to use the theme vars across my project with custom components! :)
Edit: I hope this is not the same bug as 1176. Unfortunately I don't speak Chinese :)
The text was updated successfully, but these errors were encountered: