@qte/react-native-gifted-chat
Version:
Performant fork of react-native-gifted-chat with FlashList support
26 lines • 887 B
JavaScript
import React from 'react';
import { StyleSheet, Text, View, } from 'react-native';
import Color from './Color';
import stylesCommon from './styles';
const styles = StyleSheet.create({
container: {
marginTop: 5,
marginBottom: 10,
},
text: {
backgroundColor: Color.backgroundTransparent,
color: Color.defaultColor,
fontSize: 12,
fontWeight: '300',
},
});
export function SystemMessage({ currentMessage, containerStyle, wrapperStyle, textStyle, }) {
if (currentMessage == null || currentMessage.system === false)
return null;
return (<View style={[stylesCommon.fill, stylesCommon.centerItems, styles.container, containerStyle]}>
<View style={wrapperStyle}>
<Text style={[styles.text, textStyle]}>{currentMessage.text}</Text>
</View>
</View>);
}
//# sourceMappingURL=SystemMessage.js.map