2018-09-11 16:32:52 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { Text, StyleSheet } from 'react-native';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
import { themes } from '../../app/constants/colors';
|
|
|
|
|
2018-09-11 16:32:52 +00:00
|
|
|
const styles = StyleSheet.create({
|
|
|
|
separator: {
|
|
|
|
marginTop: 30,
|
|
|
|
marginLeft: 10,
|
|
|
|
fontSize: 20,
|
|
|
|
fontWeight: '300'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
const Separator = ({ title, style, theme }) => (
|
|
|
|
<Text
|
|
|
|
style={[
|
|
|
|
styles.separator,
|
|
|
|
{
|
|
|
|
color: themes[theme].titleText,
|
2020-02-11 14:01:35 +00:00
|
|
|
backgroundColor: themes[theme].backgroundColor
|
2019-12-04 16:39:53 +00:00
|
|
|
},
|
|
|
|
style
|
|
|
|
]}
|
|
|
|
>
|
|
|
|
{title}
|
|
|
|
</Text>
|
|
|
|
);
|
2018-09-11 16:32:52 +00:00
|
|
|
|
|
|
|
Separator.propTypes = {
|
|
|
|
title: PropTypes.string.isRequired,
|
2019-12-04 16:39:53 +00:00
|
|
|
theme: PropTypes.string,
|
2018-09-11 16:32:52 +00:00
|
|
|
style: PropTypes.object
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Separator;
|