mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -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>
54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
import React from 'react';
|
|
import { Pressable, View } from 'react-native';
|
|
import { Theme } from '../ui/styleUtils';
|
|
import testIDProps from '../../shared/commonUtil';
|
|
import { Text } from '../ui';
|
|
import { displayType } from '../../machines/Issuers/IssuersMachine';
|
|
import { SvgImage } from '../ui/svg';
|
|
|
|
export const Issuer: React.FC<IssuerProps> = (props: IssuerProps) => {
|
|
|
|
return (
|
|
<Pressable
|
|
accessible={false}
|
|
{...testIDProps(`issuer-${props.testID}`)}
|
|
onPress={props.onPress}
|
|
style={({ pressed }) =>
|
|
pressed
|
|
? [
|
|
Theme.IssuersScreenStyles.issuerBoxContainerPressed,
|
|
Theme.Styles.boxShadow,
|
|
]
|
|
: [
|
|
Theme.IssuersScreenStyles.issuerBoxContainer,
|
|
Theme.Styles.boxShadow,
|
|
]
|
|
}>
|
|
<View style={Theme.IssuersScreenStyles.issuerBoxIconContainer}>
|
|
{props.displayDetails.logo
|
|
? SvgImage.IssuerIcon(props)
|
|
: SvgImage.defaultIssuerLogo(props.defaultLogo)}
|
|
</View>
|
|
<View style={Theme.IssuersScreenStyles.issuerBoxContent}>
|
|
<Text
|
|
testID={`issuerHeading-${props.testID}`}
|
|
style={Theme.IssuersScreenStyles.issuerHeading}>
|
|
{props.displayDetails.title ?? props.displayDetails.name}
|
|
</Text>
|
|
<Text
|
|
testID={`issuerDescription-${props.testID}`}
|
|
style={Theme.IssuersScreenStyles.issuerDescription}>
|
|
{props.displayDetails.description}
|
|
</Text>
|
|
</View>
|
|
</Pressable>
|
|
);
|
|
};
|
|
|
|
export interface IssuerProps {
|
|
displayDetails: displayType;
|
|
onPress: () => void;
|
|
testID: string;
|
|
defaultLogo?: any;
|
|
}
|