pro-components
pro-components copied to clipboard
🧐[问题] colorPrimary setting drawer
🧐 问题描述
when change color primary on setting drawer not effect and my all Component just blue primary color. what wrong my code?
💻 示例代码
https://codesandbox.io/s/ji-chu-shi-yong-forked-cdskzs?file=/App.tsx
🚑 其他信息
"antd": "^4.24.1", "@ant-design/pro-card": "^2.0.23", "@ant-design/pro-components": "^2.3.29", "@ant-design/pro-layout": "^7.2.0",
'root-entry-name': 'variable',我记着webpack配置需注入less变量,你试试
I use vite react can tell me how add this in vite? For now i used import 'antd/dist/antd.variable.min.css css and use ConfigProvider.config({ theme: { primaryColor: '#25b864', },
preprocessor0ptions:{
less:{
modifyVars:{
'root-entry-name': 'variable',
}}}
You can try in vite.config
After this I most delete
import 'antd/dist/antd.variable.min.css
And
ConfigProvider.config({
theme: {
primaryColor: '#25b864',
}})
???
all remain you can read docs https://ant.design/docs/react/customize-theme-variable-cn#header
I add this code to vite and fixed also no need import css and ConfigProvider.config. thx.