Set the default language to TypeScript

This commit is contained in:
Matt Aitken
2023-05-10 17:45:54 +01:00
parent 833c509606
commit 2a93c10828
@@ -16,8 +16,9 @@ import {
type CodeBlockProps = {
/** Code which will be highlighted */
code: string;
/** Programming language that should be highlighted */
language: Language;
language?: Language;
/** Show copy to clipboard button */
showCopyButton?: boolean;
@@ -149,7 +150,7 @@ export const CodeBlock = forwardRef<HTMLDivElement, CodeBlockProps>(
highlightLines,
code,
className,
language,
language = "typescript",
theme = defaultTheme,
...props
}: CodeBlockProps,