forked from openwallet-foundation/bifold-wallet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change proof req buttons and add new modal (openwallet-foundati…
…on#1122) Signed-off-by: Bryce McMath <[email protected]>
- Loading branch information
1 parent
0a4903c
commit 29c94f4
Showing
11 changed files
with
378 additions
and
43 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
packages/legacy/core/App/assets/img/no_information_shared.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions
79
packages/legacy/core/App/components/modals/ProofCancelModal.tsx
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,79 @@ | ||
import * as React from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import { Modal, ScrollView, StyleSheet, View, Text } from 'react-native' | ||
import { SafeAreaView } from 'react-native-safe-area-context' | ||
|
||
import { useTheme } from '../../contexts/theme' | ||
import { GenericFn } from '../../types/fn' | ||
import { testIdWithKey } from '../../utils/testable' | ||
import Button, { ButtonType } from '../buttons/Button' | ||
|
||
interface ProofCancelModalProps { | ||
visible?: boolean | ||
onDone?: GenericFn | ||
} | ||
|
||
const ProofCancelModal: React.FC<ProofCancelModalProps> = ({ visible, onDone }) => { | ||
const { t } = useTranslation() | ||
const { ColorPallet, TextTheme, Assets } = useTheme() | ||
|
||
const styles = StyleSheet.create({ | ||
safeAreaView: { | ||
backgroundColor: ColorPallet.brand.modalPrimaryBackground, | ||
flex: 1, | ||
}, | ||
container: { | ||
flexGrow: 1, | ||
padding: 20, | ||
}, | ||
controlsContainer: { | ||
marginHorizontal: 20, | ||
marginBottom: 10, | ||
}, | ||
content: { | ||
justifyContent: 'space-around', | ||
}, | ||
heading: { | ||
...TextTheme.modalHeadingOne, | ||
marginTop: 60, | ||
marginBottom: 30, | ||
textAlign: 'center', | ||
}, | ||
image: { | ||
alignSelf: 'center', | ||
marginBottom: 50, | ||
}, | ||
subtext: { | ||
...TextTheme.modalNormal, | ||
fontSize: 22, | ||
textAlign: 'center', | ||
}, | ||
}) | ||
|
||
return ( | ||
<Modal visible={visible} animationType="slide"> | ||
<SafeAreaView style={styles.safeAreaView}> | ||
<ScrollView style={styles.container}> | ||
<View style={styles.content}> | ||
<Text style={styles.heading}>{t('ProofRequest.NoInfoShared')}</Text> | ||
<Assets.svg.noInfoShared style={styles.image} height={200} /> | ||
<Text style={styles.subtext}>{t('ProofRequest.YourInfo')}</Text> | ||
</View> | ||
</ScrollView> | ||
<View style={styles.controlsContainer}> | ||
<View style={{ paddingTop: 10 }}> | ||
<Button | ||
title={t('Global.Done')} | ||
accessibilityLabel={t('Global.Done')} | ||
testID={testIdWithKey('Done')} | ||
onPress={onDone} | ||
buttonType={ButtonType.ModalPrimary} | ||
/> | ||
</View> | ||
</View> | ||
</SafeAreaView> | ||
</Modal> | ||
) | ||
} | ||
|
||
export default ProofCancelModal |
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
Oops, something went wrong.