mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -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>
109 lines
3.5 KiB
TypeScript
109 lines
3.5 KiB
TypeScript
import React from 'react';
|
|
import {I18nManager, Modal as RNModal, View} from 'react-native';
|
|
import {Icon} from 'react-native-elements';
|
|
import {Column, Row, Text} from '.';
|
|
import {useSendVcScreen} from '../../screens/Scan/SendVcScreenController';
|
|
import {DeviceInfoList} from '../DeviceInfoList';
|
|
import {ElevationLevel, Theme} from './styleUtils';
|
|
import testIDProps from '../../shared/commonUtil';
|
|
|
|
export const Modal: React.FC<ModalProps> = props => {
|
|
const controller = useSendVcScreen();
|
|
|
|
return (
|
|
<RNModal
|
|
{...testIDProps(props.testID)}
|
|
animationType="slide"
|
|
style={Theme.ModalStyles.modal}
|
|
visible={props.isVisible}
|
|
onShow={props.onShow}
|
|
onRequestClose={props.onDismiss}>
|
|
<Column fill safe align="center">
|
|
<Row elevation={props.headerElevation}>
|
|
<View
|
|
style={{
|
|
flex: 1,
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
marginHorizontal: 18,
|
|
marginVertical: 8,
|
|
}}>
|
|
{props.headerRight ? (
|
|
<Icon
|
|
{...testIDProps('closeModal')}
|
|
name={I18nManager.isRTL ? 'chevron-right' : 'chevron-left'}
|
|
onPress={props.onDismiss}
|
|
color={Theme.Colors.Icon}
|
|
/>
|
|
) : null}
|
|
{props.arrowLeft ? (
|
|
<Icon
|
|
{...testIDProps('arrowLeft')}
|
|
name="arrow-left"
|
|
type="material-community"
|
|
onPress={props.onDismiss}
|
|
containerStyle={Theme.Styles.backArrowContainer}
|
|
color={Theme.Colors.Icon}
|
|
/>
|
|
) : null}
|
|
<Row
|
|
fill
|
|
align={props.headerLeft ? 'flex-start' : 'center'}
|
|
margin={'16 0 0 0'}>
|
|
<Column>
|
|
<Text testID={props.testID} style={Theme.TextStyles.header}>
|
|
{props.headerTitle || props.headerLeft}
|
|
</Text>
|
|
{!props.requester ? (
|
|
<Text
|
|
weight="semibold"
|
|
style={Theme.TextStyles.small}
|
|
color={
|
|
props.headerLabelColor
|
|
? props.headerLabelColor
|
|
: Theme.Colors.profileLanguageValue
|
|
}>
|
|
{props.headerLabel}
|
|
</Text>
|
|
) : (
|
|
<Text
|
|
weight="semibold"
|
|
style={Theme.TextStyles.small}
|
|
color={Theme.Colors.IconBg}>
|
|
<DeviceInfoList deviceInfo={controller.receiverInfo} />
|
|
</Text>
|
|
)}
|
|
</Column>
|
|
</Row>
|
|
{props.headerRight || props.arrowLeft || (
|
|
<Icon
|
|
{...testIDProps('close')}
|
|
name="close"
|
|
onPress={props.onDismiss}
|
|
color={Theme.Colors.Details}
|
|
size={27}
|
|
/>
|
|
)}
|
|
</View>
|
|
</Row>
|
|
{props.children}
|
|
</Column>
|
|
</RNModal>
|
|
);
|
|
};
|
|
|
|
export interface ModalProps {
|
|
testID?: string;
|
|
isVisible: boolean;
|
|
requester?: boolean;
|
|
onDismiss?: () => void;
|
|
headerTitle?: string;
|
|
headerElevation?: ElevationLevel;
|
|
headerLabel?: string;
|
|
headerLabelColor?: string;
|
|
headerRight?: React.ReactElement;
|
|
headerLeft?: React.ReactElement;
|
|
arrowLeft?: React.ReactElement;
|
|
onShow?: () => void;
|
|
}
|