-
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 #1046 from e-mission/onboarding_routing_sept_2023
π π β Dashboard rewrite (complete) + profile logic improvements + initial testing framework!
- Loading branch information
Showing
46 changed files
with
2,707 additions
and
2,461 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
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
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; |
Oops, something went wrong.