mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
* Revert "[INJIMOB-3622] Fix alignment in history screen (#2140)" This reverts commita0b08914e5. Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * Revert "Injimob [3622] [3627] - BANNER ISSUE AND BRANDING CHANGES ISSUES (#2130)" This reverts commit522104811c. Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * Revert "[INJIMOB-3633][INJIMOB-3636] fix icon bg color across app (#2134)" This reverts commitd8d718693d. Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * Revert "[INJIMOB-3633] fix search bar clear icon not apperaing (#2133)" This reverts commit6a202b11af. Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * [INJIMOB-3651]: revert all the branding changes Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * [INJIMOB-3651]: update all the snapshot Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> --------- Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import React from 'react';
|
|
import {Pressable, View} from 'react-native';
|
|
import {Column, Row, Text} from './ui';
|
|
import {Theme} from './ui/styleUtils';
|
|
import {Icon} from 'react-native-elements';
|
|
import testIDProps from '../shared/commonUtil';
|
|
|
|
export const BannerNotification: React.FC<BannerNotificationProps> = props => {
|
|
return (
|
|
<View {...testIDProps(props.testId)}>
|
|
<Row
|
|
style={[Theme.BannerStyles.container, Theme.BannerStyles[props.type]]}>
|
|
<Column fill>
|
|
<Text
|
|
testID={`${props.testId}Text`}
|
|
color={Theme.Colors.whiteText}
|
|
weight="semibold"
|
|
style={Theme.BannerStyles.text}>
|
|
{props.message}
|
|
</Text>
|
|
</Column>
|
|
<Column>
|
|
<Pressable
|
|
style={Theme.BannerStyles.dismiss}
|
|
{...testIDProps('close')}
|
|
onPress={props.onClosePress}>
|
|
<Icon name="close" color={Theme.Colors.whiteText} size={19} />
|
|
</Pressable>
|
|
</Column>
|
|
</Row>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
export enum BannerStatusType {
|
|
IN_PROGRESS = 'inProgress',
|
|
SUCCESS = 'success',
|
|
ERROR = 'error',
|
|
}
|
|
|
|
export type BannerStatus =
|
|
| BannerStatusType.IN_PROGRESS
|
|
| BannerStatusType.SUCCESS
|
|
| BannerStatusType.ERROR;
|
|
|
|
export interface BannerNotificationProps {
|
|
message: string;
|
|
onClosePress: () => void;
|
|
testId: string;
|
|
type: BannerStatusType;
|
|
}
|