Releases: vonovak/react-navigation-header-buttons
Releases · vonovak/react-navigation-header-buttons
v3.0.4
v3.0.3
v3.0.2
v3.0.1
v3.0.0
Welcome to new major release!
❌ Breaking
- The module no longer has a default export:
HeaderButtons
which was previously default export, is now a named export.
There are a bunch of named exports and I felt like it wasn't clear which export is the "main one", so I made them all named.
- default
testID
for overflow button is now exported from here. This is so that in e2e tests, by importing it, you depend just on the constant and not other React-related stuff from this lib.
🎉 New features
- new
HiddenItem
component
If you have a lot of code where you specify show="never"
then you can make the code a little more straightforward:
<Item title="edit" show={Item.SHOW_NEVER} onPress={...} />
=>
<HiddenItem title="edit" onPress={...} />
🏋 Improvements
- easier customization of cancel button in iOS ActionSheets
There were several requests for adding aoverflowCancelButtonTitle
prop that would customize the cancel button shown in the iOS Action Sheet. I didn't want to add such prop to the api, so I looked for another way - it is now possible to import the default overflow button menu press handlers and override the cancel label (and potentially other params if someone wants that). I hope this works well for you. Let me know if not :)
See the example
- some small improvements to how code is structured
It's possible that the TS typings are now broken, unfortunately I don't have time to verify them. Please send me a PR if you encounter a problem with TS.
Lastly, thank you for using this small package!