aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/documentation/comment.tsx
blob: b8902679a64dc4858032e044af7207818b51594e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { MarkdownCodeBlock } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';
import * as ReactMarkdown from 'react-markdown';

interface CommentProps {
    comment: string;
    className?: string;
}

const defaultProps = {
    className: '',
};

export const Comment: React.SFC<CommentProps> = (props: CommentProps) => {
    return (
        <div className={`${props.className} comment`}>
            <ReactMarkdown source={props.comment} renderers={{ code: MarkdownCodeBlock }} />
        </div>
    );
};

Comment.defaultProps = defaultProps;