diff --git a/native/push/in-app-notif.react.js b/native/push/in-app-notif.react.js
index 2046de329..8e63bf1b6 100644
--- a/native/push/in-app-notif.react.js
+++ b/native/push/in-app-notif.react.js
@@ -1,87 +1,85 @@
// @flow
import * as React from 'react';
import { View, Text, StyleSheet, Platform } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { SingleLine } from '../components/single-line.react';
import type { GlobalTheme } from '../types/themes';
const edges = ['top'];
type Props = {
+title: ?string,
+message: string,
+activeTheme: ?GlobalTheme,
};
function InAppNotif(props: Props): React.Node {
const useLightStyle = Platform.OS === 'ios' && props.activeTheme !== 'dark';
let title = null;
if (props.title) {
- const titleStyles = [
- styles.title,
- useLightStyle ? styles.lightTitle : null,
- ];
title = (
<>
- {props.title}
+ {props.title}
{'\n'}
>
);
}
- const textStyles = [styles.text, useLightStyle ? styles.lightText : null];
+ const textStyles = [
+ styles.text,
+ useLightStyle ? styles.lightText : styles.darkText,
+ ];
const notificationContent = (
{title}
{props.message}
);
if (Platform.OS === 'android') {
return (
{notificationContent}
);
}
return {notificationContent};
}
const styles = StyleSheet.create({
- lightText: {
- color: 'white',
+ darkText: {
+ color: 'black',
},
- lightTitle: {
+ lightText: {
color: 'white',
},
notif: {
alignItems: 'flex-start',
alignSelf: 'flex-start',
justifyContent: 'flex-start',
width: '100%',
},
text: {
...Platform.select({
ios: {
fontSize: 16,
marginTop: 16,
marginBottom: 6,
color: 'black',
},
default: {
fontSize: 18,
marginVertical: 16,
},
}),
marginHorizontal: 10,
},
title: {
- color: 'black',
fontWeight: 'bold',
},
});
export default InAppNotif;