2019-08-27 12:25:38 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { View } from 'react-native';
|
|
|
|
|
2022-07-04 18:10:14 +00:00
|
|
|
import { TSupportedThemes } from '../../theme';
|
|
|
|
import { themes } from '../../lib/constants';
|
2019-08-27 12:25:38 +00:00
|
|
|
import styles from './styles';
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
interface IBlockQuote {
|
2022-03-25 17:20:09 +00:00
|
|
|
children: React.ReactElement | null;
|
2022-07-04 18:10:14 +00:00
|
|
|
theme: TSupportedThemes;
|
2021-09-13 20:41:05 +00:00
|
|
|
}
|
|
|
|
|
2022-07-04 18:10:14 +00:00
|
|
|
const BlockQuote = React.memo(({ children, theme }: IBlockQuote) => (
|
|
|
|
<View style={styles.container}>
|
|
|
|
<View style={[styles.quote, { backgroundColor: themes[theme].borderColor }]} />
|
|
|
|
<View style={styles.childContainer}>{children}</View>
|
|
|
|
</View>
|
|
|
|
));
|
2019-08-27 12:25:38 +00:00
|
|
|
|
|
|
|
export default BlockQuote;
|