Cross platform modal menu.
npm i react-native-mkmenu --save
Prop | Type | Default |
---|---|---|
modalTitle | string | Select item |
visible | boolean | false |
data | object | |
onPress | function | (index,menuTitle) => console.log('Selected: ' + menuTitle) |
Firstly include module in projecT
import MKMenu from 'react-native-mkmenu';
then,
<MKMenu
modalTitle={"Plase select item"}
visible={true}
data={[
{menuTitle:"Menu 1",menuIcon:<Icon name={'bug'} size={64} color="#5349fc"/>},
{menuTitle:"Menu 2"},
{menuTitle:"Menu 3"}
]}
onPress={ (index,menuTitle) => alert("Selected: " + menuTitle) }
/>