verdnatura-chat/app/containers/markdown/BlockQuote.js

24 lines
551 B
JavaScript
Raw Normal View History

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';
import styles from './styles';
2019-12-11 23:01:12 +00:00
const BlockQuote = React.memo(({ children, theme }) => (
<View style={styles.container}>
2019-12-11 23:01:12 +00:00
<View style={[styles.quote, { backgroundColor: themes[theme].borderColor }]} />
<View style={styles.childContainer}>
{children}
</View>
</View>
));
BlockQuote.propTypes = {
2019-12-11 23:01:12 +00:00
children: PropTypes.node.isRequired,
theme: PropTypes.string
};
export default BlockQuote;