Skip to content

4.0.0

Compare
Choose a tag to compare
@testshallpass testshallpass released this 07 Jun 00:39

I decided to refactor Dropdownalert to increase test coverage (+18.58%), readability and maintainability. I kept it working as expected with limited breaking changes.

I also want to thank all the contributors, feedback and support. I will help out on any open PRs that have conflicts.

Changelog

BREAKING CHANGES

  • safeAreaStyle becomes contentContainerStyle

FEATURES

  • useAnimationLock prop to prevent alerts colliding with one another during close or open animations.
  • CHANGE type is no longer validated in alertWithType and so if "unknown" type is passed the default styles are used. (i.e. like using "custom" type).
  • height added to state for use withstartDelta and endDelta to keep alert visible.
  • CancelButton component.

CHANGES

  • type, title, and message are no longer state variables. A class instance object called alertData stores this info + payload, action and interval. alertData is returned in onClose or onCancel actions.
  • use closeAction to close alert.
  • render functions return props and alertData.
  • title and message non-strings try to become strings. See: getStringValue
  • props remove from README to it's own document with table of contents.
  • label component renamed to TextView.
  • Reduce timeout usage.

FIXES

  • SafeAreaView and onLayoutEvent being called repetitively causing unnecessary state changes #173