我想一起使用react-native-popup-menu和react-native-floating-action-button组件。我试过了 :
<MenuTrigger>
<FloatingActionButton
size={56}
textDisable
iconName="directions"
iconType="material-icons"
shadowColor="#000"
iconColor="white"
backgroundColor="#405914"
/>
</MenuTrigger>
此代码不会触发 MenuTrigger,因为触发了 FloatingActionButton 的 onPress。
我也尝试过这种东西:
<MenuTrigger customStyles={{ TriggerTouchableComponent: FloatingActionButton }} />
这个触发器与 MenuTrigger 一起使用,但我无法自定义 FAB 按钮的样式。
你能给我一个解决方案吗?:)
谢谢