RocketChat/Rocket.Chat

View on GitHub
packages/gazzodown/src/blocks/QuoteBlock.tsx

Summary

Maintainability
A
55 mins
Test Coverage
import type * as MessageParser from '@rocket.chat/message-parser';
import type { ReactElement } from 'react';

import ParagraphBlock from './ParagraphBlock';

type QuoteBlockProps = {
    children: MessageParser.Paragraph[];
};

const QuoteBlock = ({ children }: QuoteBlockProps): ReactElement => (
    <blockquote>
        {children.map((paragraph, index) => (
            <ParagraphBlock key={index} children={paragraph.value} />
        ))}
    </blockquote>
);

export default QuoteBlock;