blob: c3687c5104fc4e1969d5ea96650fa52b5801bb82 (
plain) (
tree)
|
|
import { MarkdownCodeBlock } from '@0xproject/react-shared';
import * as React from 'react';
import * as ReactMarkdown from 'react-markdown';
export 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;
|