It does look like the Button component takes a styles prop which you later use to apply the Text styles.
I can't find documentation on how to change the text color. I noticed I can switch between black and white by using the type='primary' prop, but I need other colors 😄
Any hints would be greatly appreciated.
Hello @silvestreh, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!
You have to follow this object structure
https://github.com/ant-design/ant-design-mobile/blob/master/components/button/style/index.native.tsx
for example
https://github.com/ant-design/antd-mobile-samples/blob/master/rn-custom-ui/inputStyle.js
Thanks! For people who might get here through a Google search here's how I solved using @paranoidjk hints:
import ButtonStyle from 'antd-mobile/lib/button/style/index.native';
StyleSheet.create({
...ButtonStyle,
defaultRawText: {
color: 'red'
}
});
Ref: #2461 #2025 #1856 #1851 #1174 #815 #698
@silvestreh how can i do?
Most helpful comment
You have to follow this object structure
https://github.com/ant-design/ant-design-mobile/blob/master/components/button/style/index.native.tsx
for example
https://github.com/ant-design/antd-mobile-samples/blob/master/rn-custom-ui/inputStyle.js