NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Styling breaks inside custom components

Open DrummerSi opened this issue 7 years ago • 1 comments

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: Image of Issue

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

DrummerSi avatar Jun 12 '19 09:06 DrummerSi

This is probably because you are using Text from react-native in Button.js (Use Text from native-base)

Srishti-Sharma avatar Jul 12 '19 12:07 Srishti-Sharma