aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/shared/markdown_code_block.tsx
blob: 621e5b60623689bd5032beba855fbca09daa3db2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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>
    );
}