verdnatura-chat/app/containers/Separator.js

30 lines
527 B
JavaScript
Raw Normal View History

import React from 'react';
import { View, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
2019-12-04 16:39:53 +00:00
import { themes } from '../constants/colors';
const styles = StyleSheet.create({
separator: {
2019-12-04 16:39:53 +00:00
height: StyleSheet.hairlineWidth
}
});
2019-12-04 16:39:53 +00:00
const Separator = React.memo(({ style, theme }) => (
<View
style={[
styles.separator,
style,
{ backgroundColor: themes[theme].separatorColor }
]}
/>
));
Separator.propTypes = {
2019-12-04 16:39:53 +00:00
style: PropTypes.object,
theme: PropTypes.string
};
export default Separator;