github react-native-elements/react-native-elements v2.0.0

latest releases: v4.0.0-rc.8, v3.4.3, v4.0.0-rc.7...
4 years ago

Summary

The first release of 2020 of React Native Elements 🎉 This release primarily works on cleaning up and improving some existing components but needed a major release because of breaking changes. As always we'd love your feedback on some of the new changes.

We also welcome a new core contributor:

New contributors help so that the project stays alive and updated as members move on to other things in life.

Thanks to everyone who contributed to this release, and stay safe amidst the pandemic 😷

🚨 Breaking Changes

Avatar

  • overlayContainerStyle is now able to override the borderRadius set on for avatar in rounded mode. If in your app you had set borderRadius or the overflow property on this style, it will now take effect. d72d541 @sudeepto-dutta
  • editButton becomes accessory.
    onEditPress becomes onAccessoryPress
    showEditButton becomes showAccessory
    accessory can now include a source to show a custom image. #2323 @flyingcircle

Button

  • On Android, now has a coloured ripple that matches the text color while on solid, and the primary color while on clear, outline. #2137 @iRoachie. To revert this behaviour, set background={TouchableNativeFeedback.Ripple(undefined, false)}
  • When in the loading state, onPress events will no longer be triggered. db730c3 @imcvampire

ButtonGroup

Icon

  • Now uses the different Touchable for Android. TouchableNativeFeedback will be the default on Android. This will affect the Icon as well as components that use it (SearchBar). To get back the previous behaviour, use TouchableComponent={TouchableHighlight}. b7d28c7 @iRoachie
    • underlayColor is now set to transparent (previous white). To revert set underlayColor="white"
    • activeOpacity is now set to 0.3. To revert set activeOpacity={0.85}

Image

  • Image can no longer overflow the container c1690c2 @iRoachie. If you need this behaviour set containerStyle={{ overflow: 'visible' }}

Input

Overlay

Removes containerStyle, windowBackgroundColor, overlayBackgroundColor, borderRadius, width, and height props. Initial width and height of overlay are now auto before having set values. 7655a85 @iRoachie

  • containerStyle becomes backdropStyle
  • For windowBackgroundColor, set backgroundColor on backdropStyle
  • For overlayBackgroundColor, set backgroundColor on overlayStyle
  • For borderRadius, set borderRadius on overlayStyle
  • For width and height, set width and height on overlayStyle

Features

Fixes

  • Button Ripple now respects borderRadius 23652ac @iRoachie
  • ButtonGroup marginHorizontal now works on containerStyle adb2973 @oxyii
  • CheckBox Allow passing custom testID bac6063 @Asvarox
  • Tooltip Fixes issues with inaccurate tooltips with the status bar by adding a new prop skipAndroidStatusBar 8584917 @oxyii
  • Input Fixes issue with error message changing the display height of the component @saxenanihal95
  • Image Fixes issue with Image not applying style props #2313 @bscaspar

Docs

Other

Don't miss a new react-native-elements release

NewReleases is sending notifications on new releases.