NativeBase
NativeBase copied to clipboard
Styling breaks inside custom components
I have gone through these following points
- [x] Check latest documentation: https://docs.nativebase.io/
- [x] Check for existing open/closed issues for a possible duplicate before creating a new issue: https://github.com/GeekyAnts/NativeBase/issues
- [x] Use the latest NativeBase release: https://github.com/GeekyAnts/NativeBase/releases
- [x] Check examples from NativeBase KitchenSink https://github.com/GeekyAnts/NativeBase-
Issue Description
Buttons rendered directly to a React Component display correctly, but buttons rendered inside custom components do not.. As Shown:

Expected behaviour
Consistent styling of button (all components) no matter how deeply nested they are
Actual behaviour
Button styling breaks in basic custom components
Steps to reproduce
See attached Snack link Snack link
Code
App.js
<Button warning><Text>Button 1</Text></Button>
<MyButton />
MyButton.js
export default class MyButton extends React.Component {
render() {
return (
<Button warning><Text>Button 1</Text></Button>
);
}
}
Note: This bug was first noticed building a React native app on Mac with Xcode, but was produced in Expo using the link above
This is probably because you are using Text from react-native in Button.js (Use Text from native-base)