2021-10-20 16:32:58 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { View } from 'react-native';
|
|
|
|
import { Quote as QuoteProps } from '@rocket.chat/message-parser';
|
|
|
|
|
|
|
|
import { themes } from '../../../constants/colors';
|
|
|
|
import { useTheme } from '../../../theme';
|
|
|
|
import styles from '../styles';
|
|
|
|
import Paragraph from './Paragraph';
|
|
|
|
|
|
|
|
interface IQuoteProps {
|
|
|
|
value: QuoteProps['value'];
|
|
|
|
}
|
|
|
|
|
2022-03-25 17:20:09 +00:00
|
|
|
const Quote = ({ value }: IQuoteProps) => {
|
2021-10-20 16:32:58 +00:00
|
|
|
const { theme } = useTheme();
|
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
2022-03-25 17:20:09 +00:00
|
|
|
<View style={[styles.quote, { backgroundColor: themes[theme].borderColor }]} />
|
2021-10-20 16:32:58 +00:00
|
|
|
<View style={styles.childContainer}>
|
|
|
|
{value.map(item => (
|
|
|
|
<Paragraph value={item.value} />
|
|
|
|
))}
|
|
|
|
</View>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Quote;
|