-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1029 from Abby-Wheelis/unblock-routing
Profile changes to unblock routing
- Loading branch information
Showing
19 changed files
with
931 additions
and
484 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from "react"; | ||
import { Modal } from "react-native"; | ||
import { Dialog, Button, useTheme } from "react-native-paper"; | ||
import { useTranslation } from "react-i18next"; | ||
import { settingStyles } from "../control/ProfileSettings"; | ||
|
||
const ActionMenu = ({vis, setVis, title, actionSet, onAction, onExit}) => { | ||
|
||
const { t } = useTranslation(); | ||
const { colors } = useTheme(); | ||
|
||
return ( | ||
<Modal visible={vis} onDismiss={() => setVis(false)} | ||
transparent={true}> | ||
<Dialog visible={vis} | ||
onDismiss={() => setVis(false)} | ||
style={settingStyles.dialog(colors.elevation.level3)}> | ||
<Dialog.Title>{title}</Dialog.Title> | ||
<Dialog.Content> | ||
{actionSet?.map((e) => | ||
<Button key={e.text} | ||
onPress={() => { | ||
onAction(e); | ||
setVis(false); | ||
}}> | ||
{e.text} | ||
</Button> | ||
)} | ||
</Dialog.Content> | ||
<Dialog.Actions> | ||
<Button onPress={() => {setVis(false); | ||
onExit();}}>{ | ||
t('general-settings.cancel')} | ||
</Button> | ||
</Dialog.Actions> | ||
</Dialog> | ||
</Modal> | ||
) | ||
} | ||
|
||
export default ActionMenu; |
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
Oops, something went wrong.