2019-08-27 12:25:38 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { View } from 'react-native';
|
|
|
|
|
2022-06-27 21:27:22 +00:00
|
|
|
import { useTheme } from '../../theme';
|
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;
|
2021-09-13 20:41:05 +00:00
|
|
|
}
|
|
|
|
|
2022-06-27 21:27:22 +00:00
|
|
|
const BlockQuote = React.memo(({ children }: IBlockQuote) => {
|
|
|
|
const { colors } = useTheme();
|
|
|
|
return (
|
|
|
|
<View style={styles.container} testID='markdown-block-quote'>
|
|
|
|
<View style={[styles.quote, { backgroundColor: colors.borderColor }]} />
|
|
|
|
<View style={styles.childContainer}>{children}</View>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
});
|
2019-08-27 12:25:38 +00:00
|
|
|
|
|
|
|
export default BlockQuote;
|