We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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做二次封装,有些二次封装的组件需要覆盖内部的antd的组件的样式,比如这样
// 组件内的定义 const { createStyles } = createInstance({ key: 'my-custom-component', prefixCls: 'my-custom-component', }) const useStyles = createStyles(({ css, prefixCls }) => ({ dropdownStyle: css` .${prefixCls}-select-item-option { padding: 5px 16px; } ` })
<ThemeProvider prefix='project-a'> <App /> </ThemeProvider>
组件内是希望通过类名来覆盖内部的antd的组件的样式,在3.6.0之前,createStyles里面拿到的通过ThemeProvider传入的prefixCls project-a, 3.6.0之后拿到的prefixCls就是 my-custom-component 了,这样就覆盖不了内部的antd组件的样式了
所以实际上两个prefixCls我都需要, createInstance传入的prefixCls来控制自己实现的部分,antdPrefixCls来覆盖antd的组件
希望能把两个都返回,或者有没有其他方法能满足我的需求
同时返回两种prefixCls
The text was updated successfully, but these errors were encountered:
可以,我后续实现下
Sorry, something went wrong.
No branches or pull requests
🥰 需求描述
目前在基于antd做二次封装,有些二次封装的组件需要覆盖内部的antd的组件的样式,比如这样
组件内是希望通过类名来覆盖内部的antd的组件的样式,在3.6.0之前,createStyles里面拿到的通过ThemeProvider传入的prefixCls project-a, 3.6.0之后拿到的prefixCls就是 my-custom-component 了,这样就覆盖不了内部的antd组件的样式了
所以实际上两个prefixCls我都需要, createInstance传入的prefixCls来控制自己实现的部分,antdPrefixCls来覆盖antd的组件
希望能把两个都返回,或者有没有其他方法能满足我的需求
🧐 解决方案
同时返回两种prefixCls
🚑 其他信息
The text was updated successfully, but these errors were encountered: