Version 1.0 馃帀
Breaking Changes in Version 1.0
For Version 1.0, the library was refactored and simplified.
- No more
animatedprop - if you want to have your tooltips animated, use the last stable version:0.6.1. Hopefully animations can be added again in the sure (great idea for a PR!) - No more
displayAreaandchildlessPlacementPaddingprops - these have been replaced with thedisplayInsetsprop, which allows you to simply declare how many pixels in from each side of the screen to inset the area the tooltip may display. - Tooltips are now bound by the displayInsets - before if your content was larger than the displayArea prop, the tooltip would render outside of the display area. Now the tooltip should always resize to be inside the display area as defined by the
displayInsetsprop - Removed the "auto" option for placement - you must now specify a direction
- Added the "center" option for childless placement - option to center the tooltip within the bounds of the
displayInsetswhen it does not point to a child - Added
useReactNativeModalprop - this allows you to enable/disable the usage of React Native'sModalcomponent to render the tooltip content. It is true by default.
Changes to handling users pressing the tooltip child element:
- No more
onChildPressandonChildLongPressprops - touches are now passed to the child by default. This allows you to maintain the original functionality of the child element. Further, the tooltip will also automatically dismiss on interaction with the child element. - Added
closeOnChildInteractionprop - if you want the user to be able to interact with the child element, but not automatically dismiss the tooltip when they do so, set this to false (true by default) - Added
allowChildInteractionprop - if you'd like to disable interaction with the child element, set this to false (true by default). When false, tapping on the child element will callonCloseas if the user touched the background element.