verdnatura-chat/app/containers/markdown/new/Quote.tsx

29 lines
714 B
TypeScript
Raw Normal View History

2021-10-28 17:48:53 +00:00
import React from 'react';
import { View } from 'react-native';
import { Quote as QuoteProps } from '@rocket.chat/message-parser';
2022-04-28 18:45:00 +00:00
import { themes } from '../../../lib/constants';
2021-10-28 17:48:53 +00:00
import { useTheme } from '../../../theme';
import styles from '../styles';
import Paragraph from './Paragraph';
interface IQuoteProps {
value: QuoteProps['value'];
}
2022-03-29 18:53:10 +00:00
const Quote = ({ value }: IQuoteProps) => {
2021-10-28 17:48:53 +00:00
const { theme } = useTheme();
return (
<View style={styles.container}>
2022-03-29 18:53:10 +00:00
<View style={[styles.quote, { backgroundColor: themes[theme].borderColor }]} />
2021-10-28 17:48:53 +00:00
<View style={styles.childContainer}>
{value.map(item => (
<Paragraph value={item.value} />
))}
</View>
</View>
);
};
export default Quote;