Easily render header buttons for react-navigation
MIT License
Published by vonovak over 6 years ago
This release includes a new onOverflowMenuPress?: ({ hiddenButtons: Array<React.Element<*>> })=>any
prop which you can use to handle tapping on the overflow button. This may be handy if the default handlers do not fit your needs.
onOverflowMenuPress
accepts a single parameter - an object with hiddenButtons
key.
Published by vonovak over 6 years ago
this release includes
Published by vonovak over 6 years ago
OverflowIcon is now required if you need overflow buttons. No default OverflowIcon is provided. There are no other steps needed to upgrade.
Published by vonovak over 6 years ago
you can now import Please note this was removed in 1.0.0HeaderButtons
with predefined IconComponent
, see the comparison.
ex:
import { IoniconHeaderButtons, Item } from 'react-navigation-header-buttons'
static navigationOptions = {
title: 'Usage With Icons',
headerRight: (
<IoniconHeaderButtons color="blue">
<Item title="add" iconName="ios-search" onPress={() => console.warn('add')} />
<Item title="select" onPress={() => console.warn('edit')} />
</IoniconHeaderButtons>
),
};
Published by vonovak over 6 years ago
onPress
prop, the rendered button won't respond to touchesPublished by vonovak over 6 years ago
Published by vonovak over 6 years ago
overflowButtonWrapperStyle
prop