-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6585e6
commit 3a5303b
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Component } from 'react'; | ||
import { NativeSyntheticEvent } from 'react-native'; | ||
|
||
export interface ContextMenuAction { | ||
/** | ||
* The title of the action | ||
*/ | ||
title?: string; | ||
/** | ||
* The icon to use on ios. This is the name of the SFSymbols icon to use. On Android nothing will happen if you set this option. | ||
*/ | ||
systemIcon?: string; | ||
} | ||
|
||
export interface ContextMenu extends Component { | ||
/** | ||
* The title of the menu | ||
*/ | ||
title?: string; | ||
/** | ||
* The actions to show the user when the menu is activated | ||
*/ | ||
actions?: Array<ContextMenuAction>; | ||
/** | ||
* Handle when an action is triggered and the menu is closed. The name of the selected action will be passed in the event. | ||
*/ | ||
onPress?: (e: NativeSyntheticEvent<{name: string}>) => void; | ||
/** | ||
* Handle when the menu is cancelled and closed | ||
*/ | ||
onCancel?: () => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters