aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/shared/markdown_code_block.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/pages/shared/markdown_code_block.tsx')
-rw-r--r--packages/website/ts/pages/shared/markdown_code_block.tsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/website/ts/pages/shared/markdown_code_block.tsx b/packages/website/ts/pages/shared/markdown_code_block.tsx
new file mode 100644
index 000000000..621e5b606
--- /dev/null
+++ b/packages/website/ts/pages/shared/markdown_code_block.tsx
@@ -0,0 +1,20 @@
+import * as _ from 'lodash';
+import * as React from 'react';
+import * as HighLight from 'react-highlight';
+
+interface MarkdownCodeBlockProps {
+ literal: string;
+ language: string;
+}
+
+export function MarkdownCodeBlock(props: MarkdownCodeBlockProps) {
+ return (
+ <span style={{fontSize: 16}}>
+ <HighLight
+ className={props.language || 'js'}
+ >
+ {props.literal}
+ </HighLight>
+ </span>
+ );
+}