mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-08 05:03:56 -05:00
* refactor(INJI-569): changing png to svg images from setup to home screen Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * Refactor(INJI-569): changing png to svg images settings screen Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * [INJI-569] changing png to svg image Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569]: Adjusted all the alignment in settings screen Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * [INJI-569] fix SuccessLogo size and and alignment Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569] refactor theme files and removing unused QrLoginWarning component Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569] changing the naming convention of svg images Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569] fix Typo mistake and remove unused imports Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569] fix Typo mistake, misssing imports and remove unused elements Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569]: Adjusted all the alignment of icons with tag name in settings screen Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * [INJI-569] renaming the files Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> --------- Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> Signed-off-by: anil_majji <majjianilkumar050@gmail.com> Co-authored-by: anil_majji <majjianilkumar050@gmail.com>
77 lines
2.2 KiB
TypeScript
77 lines
2.2 KiB
TypeScript
import React from 'react';
|
|
import {useTranslation} from 'react-i18next';
|
|
import {Button, Centered, Column, Text} from './ui';
|
|
import {Modal} from './ui/Modal';
|
|
import {Theme} from './ui/styleUtils';
|
|
import Spinner from 'react-native-spinkit';
|
|
import {SvgImage} from './ui/svg';
|
|
|
|
export const ProgressingModal: React.FC<ProgressingModalProps> = props => {
|
|
const {t} = useTranslation('ScanScreen');
|
|
|
|
return (
|
|
<React.Fragment>
|
|
<Modal
|
|
isVisible={props.isVisible}
|
|
headerTitle={t(props.title)}
|
|
onDismiss={props.onCancel}
|
|
headerElevation={3}
|
|
modalStyle={Theme.ModalStyles.progressingModal}
|
|
requester={props.requester}>
|
|
<Centered crossAlign="center" fill>
|
|
<Column margin="24 0" align="space-around">
|
|
{SvgImage.ProgressIcon()}
|
|
{props.progress && (
|
|
<Spinner
|
|
type="ThreeBounce"
|
|
color={Theme.Colors.Loading}
|
|
style={{marginLeft: 6}}
|
|
/>
|
|
)}
|
|
</Column>
|
|
{(props.isHintVisible || props.isBleErrorVisible) && (
|
|
<Column style={Theme.SelectVcOverlayStyles.timeoutHintContainer}>
|
|
<Text
|
|
align="center"
|
|
margin="10"
|
|
color={Theme.Colors.TimeoutHintText}
|
|
size="small"
|
|
style={Theme.TextStyles.bold}>
|
|
{props.hint}
|
|
</Text>
|
|
{props.onStayInProgress && (
|
|
<Button
|
|
type="clear"
|
|
title={t('status.stayOnTheScreen')}
|
|
onPress={props.onStayInProgress}
|
|
/>
|
|
)}
|
|
|
|
{props.onRetry && (
|
|
<Button
|
|
type="clear"
|
|
title={t('status.retry')}
|
|
onPress={props.onRetry}
|
|
/>
|
|
)}
|
|
</Column>
|
|
)}
|
|
</Centered>
|
|
</Modal>
|
|
</React.Fragment>
|
|
);
|
|
};
|
|
|
|
export interface ProgressingModalProps {
|
|
isVisible: boolean;
|
|
isHintVisible: boolean;
|
|
isBleErrorVisible?: boolean;
|
|
title?: string;
|
|
hint?: string;
|
|
onCancel?: () => void;
|
|
onStayInProgress?: () => void;
|
|
onRetry?: () => void;
|
|
requester?: boolean;
|
|
progress?: boolean | number;
|
|
}
|