import React from 'react';
import { View } from 'react-native';
import { HoldItem } from 'react-native-hold-menu';
import styles from './styles';
const MenuItems = [
{ text: 'Actions', icon: 'home', isTitle: true, onPress: () => {} },
{ text: 'Action 1', icon: 'edit', onPress: () => {} },
{ text: 'Action 2', icon: 'map-pin', withSeparator: true, onPress: () => {} },
{ text: 'Action 3', icon: 'trash', isDestructive: true, onPress: () => {} },
];
const Example = () => {
return (
<View style={styles.container}>
<HoldItem items={MenuItems}>
<View style={styles.item} />
</HoldItem>
<HoldItem items={MenuItems}>
<View style={styles.item} />
</HoldItem>
<HoldItem items={MenuItems} menuAnchorPosition="bottom-right">
<View style={styles.item} />
</HoldItem>
</View>
);
};
export default Example;