2019-09-03 19:27:57 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { View } from 'react-native';
|
|
|
|
|
2019-12-11 23:01:12 +00:00
|
|
|
import { themes } from '../../constants/colors';
|
|
|
|
|
2019-09-03 19:27:57 +00:00
|
|
|
import styles from './styles';
|
|
|
|
|
2019-12-11 23:01:12 +00:00
|
|
|
const BlockQuote = React.memo(({ children, theme }) => (
|
2019-09-03 19:27:57 +00:00
|
|
|
<View style={styles.container}>
|
2019-12-11 23:01:12 +00:00
|
|
|
<View style={[styles.quote, { backgroundColor: themes[theme].borderColor }]} />
|
2019-09-03 19:27:57 +00:00
|
|
|
<View style={styles.childContainer}>
|
|
|
|
{children}
|
|
|
|
</View>
|
|
|
|
</View>
|
|
|
|
));
|
|
|
|
|
|
|
|
BlockQuote.propTypes = {
|
2019-12-11 23:01:12 +00:00
|
|
|
children: PropTypes.node.isRequired,
|
|
|
|
theme: PropTypes.string
|
2019-09-03 19:27:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default BlockQuote;
|