mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-08 21:18:14 -05:00
[INJIMOB-3058]temp commit2 [INJIMOB-3058]temp commit2 [INJIMOB-3058] add support for pre-auth flow by credential-offer [INJIMOB-3187] animo working chcekpoint Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
57 lines
1.9 KiB
TypeScript
57 lines
1.9 KiB
TypeScript
import React from 'react';
|
|
import { Modal, View, Text, TouchableWithoutFeedback } from 'react-native';
|
|
import { Button } from '../../components/ui';
|
|
import { Theme } from '../../components/ui/styleUtils';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
interface CancelDownloadModalProps {
|
|
visible: boolean;
|
|
onCancel: () => void;
|
|
onConfirm: () => void;
|
|
}
|
|
|
|
export const CancelDownloadModal: React.FC<CancelDownloadModalProps> = ({
|
|
visible,
|
|
onCancel,
|
|
onConfirm,
|
|
}) => {
|
|
const {t} = useTranslation('cancelDownloadModal');
|
|
return (
|
|
<Modal visible={visible} transparent={true} onRequestClose={onCancel}>
|
|
<TouchableWithoutFeedback onPress={null}>
|
|
<View
|
|
style={Theme.TransactionCodeScreenStyle.confirmationModalView}>
|
|
<TouchableWithoutFeedback>
|
|
<View
|
|
style={Theme.TransactionCodeScreenStyle.confirmationModalInnerView}>
|
|
<Text testID="cancelDownoadModalHeading" style={Theme.TransactionCodeScreenStyle.confirmationModalContentHeading}>
|
|
{t('heading')}
|
|
</Text>
|
|
<Text
|
|
testID='cancelDownoadModalSubHeading'
|
|
style={Theme.TransactionCodeScreenStyle.confirmationModalContentSubHeading}>
|
|
{t('subHeading')}
|
|
</Text>
|
|
|
|
<Button
|
|
testID="cancelDownloadModalNoButton"
|
|
styles={{ marginTop: 24 }}
|
|
type="gradient"
|
|
title={t('cancel')}
|
|
onPress={onCancel}
|
|
/>
|
|
<Button
|
|
testID='cancelDownloadModalYesButton'
|
|
styles={{ marginTop: 12, marginBottom: -20 }}
|
|
type="clear"
|
|
title={t('confirm')}
|
|
onPress={onConfirm}
|
|
/>
|
|
</View>
|
|
</TouchableWithoutFeedback>
|
|
</View>
|
|
</TouchableWithoutFeedback>
|
|
</Modal>
|
|
);
|
|
};
|