Reputation: 869
I would like to use react-native-popup-menu and react-native-floating-action-button components together. I've tried :
<MenuTrigger>
<FloatingActionButton
size={56}
textDisable
iconName="directions"
iconType="material-icons"
shadowColor="#000"
iconColor="white"
backgroundColor="#405914"
/>
</MenuTrigger>
This code does not trigger the MenuTrigger because FloatingActionButton's onPress is triggered.
I also tried this kinds of stuff :
<MenuTrigger customStyles={{ TriggerTouchableComponent: FloatingActionButton }} />
This one's trigger is working with MenuTrigger but I cannot customize the FAB button's styling.
Can you provide me a solution ? :)
Thank you
Upvotes: 3
Views: 1633
Reputation: 4340
Using react-native-popup-menu
version 0.15.12 I am able now to achieve this with
<MenuTrigger>
<MyCustomButtonComponent>
<Icon ...>
</MyCustomButtonComponent>
</MenuTrigger>
Upvotes: 0