mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
Add a Markdown component and a SyntaxHighlighter
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
// @flow
|
||||
import React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import { apiClient } from "@scm-manager/ui-components";
|
||||
import { apiClient, SyntaxHighlighter } from "@scm-manager/ui-components";
|
||||
import type { File } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification, Loading } from "@scm-manager/ui-components";
|
||||
import SyntaxHighlighter from "react-syntax-highlighter";
|
||||
import { arduinoLight } from "react-syntax-highlighter/styles/hljs";
|
||||
|
||||
type Props = {
|
||||
t: string => string,
|
||||
@@ -68,12 +66,9 @@ class SourcecodeViewer extends React.Component<Props, State> {
|
||||
|
||||
return (
|
||||
<SyntaxHighlighter
|
||||
showLineNumbers="true"
|
||||
language={getLanguage(language)}
|
||||
style={arduinoLight}
|
||||
>
|
||||
{content}
|
||||
</SyntaxHighlighter>
|
||||
value= {content}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user