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';
|
|
|
|
|
2022-07-04 18:10:14 +00:00
|
|
|
import { themes } from '../../../lib/constants';
|
2021-10-20 16:32:58 +00:00
|
|
|
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) => {
|
2022-07-04 18:10:14 +00:00
|
|
|
const { theme } = useTheme();
|
2021-10-20 16:32:58 +00:00
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
2024-04-18 10:19:54 +00:00
|
|
|
<View style={[styles.quote, { backgroundColor: themes[theme].strokeLight }]} />
|
2021-10-20 16:32:58 +00:00
|
|
|
<View style={styles.childContainer}>
|
|
|
|
{value.map(item => (
|
|
|
|
<Paragraph value={item.value} />
|
|
|
|
))}
|
|
|
|
</View>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Quote;
|