ant-design / ant-design-mobile-rn

Ant Design for React Native
https://rn.mobile.ant.design/
MIT License
3k stars 610 forks source link

Button custom theme invalid #1277

Closed evan0204 closed 1 year ago

evan0204 commented 1 year ago

Reproduction link

https://github.com/ant-design/ant-design-mobile-rn/blob/master/components/style/themes/default.tsx

Steps to reproduce

const themeConfig: Partial = { brand_primary: primaryColor, color_text_base: '#FFFFFF', primary_button_fill: primaryColor, ghost_button_color: primaryColor, fill_base: primaryColor, button_height: 120, button_font_size: 20, };

<Provider theme={themeConfig}>

自定义主题部分字段颜色,不同文字部分有效,按钮部分无效 是参照这个字段设置的:https://github.com/ant-design/ant-design-mobile-rn/blob/master/components/style/themes/default.tsx

What is expected?

和自定义主题颜色一致

What is actually happening?

保持了默认颜色

Environment Info
antd 5.0.2
React react-native 0.70.1
System Macos 13.0
Browser chrome

造成这种问题的原因是什么?是因为Button组件有自定义样式?默认主题样式被覆盖了?还是其他问题?如果要在全局改变Button这种组件样式有什么其他方便方式?目前没有测试过更其他组件,如果是Button自有独立样式造成的,那还有哪些组件也是类似的?

谢谢

@BANG88