When a menu item is selected, e.g highlight, I want to replace show colours to be selected within the same context menu. the defaultMenuItems should be replaced with the highlightMenuItems
const defaultMenuItems = [
{
label: "Tweet",
key: "tweet",
},
{
label: "Save",
key: "save",
},
{
label: "Highlight",
key: "highlight",
},
{
label: "Copy",
key: "copy",
},
];
const highlightMenuItems = [
{
key: "red",
label: "Red",
},
{
key: "green",
label: "Green",
},
{
key: "blue",
label: "Blue",
},
];
return (
<WebView
style={styles.container}
source={{ uri: "; }}
menuItems={defaultMenuItems}
onCustomMenuSelection={handleCustomMenuSelection}
/>
);