aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/ts/components/type_definition.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/react-docs/src/ts/components/type_definition.tsx')
-rw-r--r--packages/react-docs/src/ts/components/type_definition.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/react-docs/src/ts/components/type_definition.tsx b/packages/react-docs/src/ts/components/type_definition.tsx
index e3cd218f9..68ef4c465 100644
--- a/packages/react-docs/src/ts/components/type_definition.tsx
+++ b/packages/react-docs/src/ts/components/type_definition.tsx
@@ -4,6 +4,7 @@ import * as React from 'react';
import { DocsInfo } from '../docs_info';
import { CustomType, CustomTypeChild, KindString, TypeDocTypes } from '../types';
+import { constants } from '../utils/constants';
import { utils } from '../utils/utils';
import { Comment } from './comment';
@@ -111,7 +112,9 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
/>
<div style={{ fontSize: 16 }}>
<pre>
- <code className="hljs">{codeSnippet}</code>
+ <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}>
+ {codeSnippet}
+ </code>
</pre>
</div>
<div style={{ maxWidth: 620 }}>