Version 1.0 🎉
Breaking Changes in Version 1.0
For Version 1.0, the library was refactored and simplified.
- No more
animated
prop - 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
displayArea
andchildlessPlacementPadding
props - these have been replaced with thedisplayInsets
prop, 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
displayInsets
prop - 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
displayInsets
when it does not point to a child - Added
useReactNativeModal
prop - this allows you to enable/disable the usage of React Native'sModal
component to render the tooltip content. It is true by default.
Changes to handling users pressing the tooltip child element:
- No more
onChildPress
andonChildLongPress
props - 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
closeOnChildInteraction
prop - 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
allowChildInteraction
prop - 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 callonClose
as if the user touched the background element.