mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-08 21:18:14 -05:00
* chore(INJI-195): upgrade react native version and dependencies * chore(INJI-195): upgrade expo version and dependencies * chore(INJI-195): modify associated files on version upgrade * chore(INJI-295): fixed react native flipper and patch packages * chore(INJI-195): fix for expo prebuild * chore(INJI-195): expo linked to android/ios projects * chore(INJI-195): update metro config * chore(INJI-195): fix ios build with mmkv storage patch * chore(INJI-195): gradle version modified * chore(INJI-195): fixed rn version 0.71.8 due to mmkv library issue * chore(INJI-195): removed files in android * chore(INJI-195): fix 0.71.8 for iOS project through pods with expo linking * chore(INJI-195): fix for custom fonts added through pods due to rn linkage * chore(INJI-195): fix for removing assets.car generated from pods * Modify Node version in pipeline (#806) * chore(INJI-195): fix for android splash screen not shown up * chore(INJI-195): upgraded to node 18 in pipeline * chore(INJI-195): add the pod install twice to remove duplicates via script workaround (#807) Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> * INJI-195 Set the signing team for iOS (#810) * chore(INJI-195): add the pod install twice to remove duplicates via script workaround * chore(INJI-195): set the signing team for ios build --------- Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> * Modify github runner to self hosted runner (#811) * chore(INJI-195): add the pod install twice to remove duplicates via script workaround * chore(INJI-195): set the signing team for ios build * chore(INJI-195): set the self hosted runner for ios build --------- Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> * Modify self hosted runner to github hosted runner (#813) * chore(INJI-195): add the pod install twice to remove duplicates via script workaround * chore(INJI-195): set the signing team for ios build * chore(INJI-195): set the self hosted runner for ios build * chore(INJI-195): modify the self hosted to github hosted runner --------- Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> * chore(INJI-195): modify the self hosted to github hosted runner * chore(INJI-195): set the code signing identity for ios build * chore(INJI-195): assigned app icon files to asset --------- Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> Signed-off-by: Swati Goel <meet2swati@gmail.com> Co-authored-by: Swati Goel <meet2swati@gmail.com>
69 lines
2.1 KiB
TypeScript
69 lines
2.1 KiB
TypeScript
import React, {useEffect, useState} from 'react';
|
|
import {Dimensions, Pressable} from 'react-native';
|
|
import {Icon, Overlay} from 'react-native-elements';
|
|
import {Centered, Column, Row, Text} from './ui';
|
|
import QRCode from 'react-native-qrcode-svg';
|
|
import {Theme} from './ui/styleUtils';
|
|
import {Image} from 'react-native';
|
|
import {useTranslation} from 'react-i18next';
|
|
|
|
export const QrCodeOverlay: React.FC<QrCodeOverlayProps> = props => {
|
|
const {t} = useTranslation('VcDetails');
|
|
|
|
const [isQrOverlayVisible, setIsQrOverlayVisible] = useState(false);
|
|
|
|
const toggleQrOverlay = () => setIsQrOverlayVisible(!isQrOverlayVisible);
|
|
return (
|
|
<React.Fragment>
|
|
<Pressable onPress={toggleQrOverlay}>
|
|
<Row margin="20 0 0 0">
|
|
<QRCode
|
|
size={90}
|
|
value={props.qrCodeDetailes}
|
|
backgroundColor={Theme.Colors.QRCodeBackgroundColor}
|
|
/>
|
|
</Row>
|
|
<Row
|
|
align="flex-end"
|
|
margin="-30 0 0 60"
|
|
style={Theme.QrCodeStyles.magnifierZoom}>
|
|
<Image source={Theme.MagnifierZoom} />
|
|
</Row>
|
|
</Pressable>
|
|
<Overlay
|
|
isVisible={isQrOverlayVisible}
|
|
onBackdropPress={toggleQrOverlay}
|
|
overlayStyle={{padding: 1, borderRadius: 21}}>
|
|
<Column style={Theme.QrCodeStyles.expandedQrCode}>
|
|
<Row pY={20} style={Theme.QrCodeStyles.QrCodeHeader}>
|
|
<Text
|
|
testID="qrCodeHeader"
|
|
align="center"
|
|
style={Theme.TextStyles.header}
|
|
weight="bold">
|
|
{t('qrCodeHeader')}
|
|
</Text>
|
|
<Icon
|
|
name="close"
|
|
onPress={toggleQrOverlay}
|
|
color={Theme.Colors.Details}
|
|
size={32}
|
|
/>
|
|
</Row>
|
|
<Centered testID="qrCodeDetailes" pY={30}>
|
|
<QRCode
|
|
size={300}
|
|
value={props.qrCodeDetailes}
|
|
backgroundColor={Theme.Colors.QRCodeBackgroundColor}
|
|
/>
|
|
</Centered>
|
|
</Column>
|
|
</Overlay>
|
|
</React.Fragment>
|
|
);
|
|
};
|
|
|
|
interface QrCodeOverlayProps {
|
|
qrCodeDetailes: string;
|
|
}
|