2020-03-30 19:20:50 +00:00
|
|
|
import React from 'react';
|
2021-10-01 18:12:19 +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';
|
2022-04-28 18:44:40 +00:00
|
|
|
import { themes } from '../lib/constants';
|
|
|
|
import { TSupportedThemes } from '../theme';
|
2020-03-30 19:20:50 +00:00
|
|
|
|
|
|
|
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-10-01 18:12:19 +00:00
|
|
|
interface IOrSeparator {
|
2022-04-28 18:44:40 +00:00
|
|
|
theme: TSupportedThemes;
|
2021-10-01 18:12:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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-10-01 18:12:19 +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;
|