aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components/comment.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/react-docs/src/components/comment.tsx')
-rw-r--r--packages/react-docs/src/components/comment.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/react-docs/src/components/comment.tsx b/packages/react-docs/src/components/comment.tsx
new file mode 100644
index 000000000..0d63d4d31
--- /dev/null
+++ b/packages/react-docs/src/components/comment.tsx
@@ -0,0 +1,23 @@
+import { MarkdownCodeBlock } from '@0xproject/react-shared';
+import * as _ from 'lodash';
+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;