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';
|
2022-04-07 14:10:03 +00:00
|
|
|
import { themes } from '../lib/constants';
|
2022-04-12 16:27:05 +00:00
|
|
|
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-09-13 20:41:05 +00:00
|
|
|
interface IOrSeparator {
|
2022-04-12 16:27:05 +00:00
|
|
|
theme: TSupportedThemes;
|
2021-09-13 20:41:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const OrSeparator = React.memo(({ theme }: IOrSeparator) => {
|
2024-04-18 10:19:54 +00:00
|
|
|
const line = { backgroundColor: themes[theme].strokeLight };
|
|
|
|
const text = { color: themes[theme].fontSecondaryInfo };
|
2020-03-30 19:20:50 +00:00
|
|
|
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;
|