2020-03-30 19:20:50 +00:00
|
|
|
import React from 'react';
|
2021-09-13 20:41:05 +00:00
|
|
|
import { StyleSheet, Text, View } from 'react-native';
|
2020-03-30 19:20:50 +00:00
|
|
|
|
|
|
|
import I18n from '../i18n';
|
|
|
|
import sharedStyles from '../views/Styles';
|
|
|
|
import { themes } from '../constants/colors';
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
flexDirection: 'row',
|
|
|
|
alignItems: 'center',
|
|
|
|
marginVertical: 24
|
|
|
|
},
|
|
|
|
line: {
|
|
|
|
height: 1,
|
|
|
|
flex: 1
|
|
|
|
},
|
|
|
|
text: {
|
|
|
|
fontSize: 14,
|
|
|
|
marginLeft: 14,
|
|
|
|
marginRight: 14,
|
|
|
|
...sharedStyles.textMedium
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
interface IOrSeparator {
|
|
|
|
theme: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const OrSeparator = React.memo(({ theme }: IOrSeparator) => {
|
2020-03-30 19:20:50 +00:00
|
|
|
const line = { backgroundColor: themes[theme].borderColor };
|
|
|
|
const text = { color: themes[theme].auxiliaryText };
|
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
|
|
|
<View style={[styles.line, line]} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<Text style={[styles.text, text]}>{I18n.t('OR')}</Text>
|
2020-03-30 19:20:50 +00:00
|
|
|
<View style={[styles.line, line]} />
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
export default OrSeparator;
|