mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-04 13:49:13 +01:00
allow lazy markdown view to support className
This commit is contained in:
@@ -49,9 +49,11 @@ import merge from "deepmerge";
|
||||
import { createComponentList } from "./createComponentList";
|
||||
import { ProtocolLinkRendererExtension, ProtocolLinkRendererExtensionMap } from "./markdownExtensions";
|
||||
import styled from "styled-components";
|
||||
import classNames from "classnames";
|
||||
|
||||
export type MarkdownProps = {
|
||||
content: string;
|
||||
className?: string;
|
||||
renderContext?: object;
|
||||
renderers?: any;
|
||||
skipHtml?: boolean;
|
||||
@@ -156,6 +158,7 @@ class LazyMarkdownView extends React.Component<Props, State> {
|
||||
basePath,
|
||||
permalink,
|
||||
t,
|
||||
className,
|
||||
mdastPlugins = [],
|
||||
} = this.props;
|
||||
|
||||
@@ -233,7 +236,10 @@ class LazyMarkdownView extends React.Component<Props, State> {
|
||||
|
||||
return (
|
||||
<ErrorBoundary fallback={MarkdownErrorNotification}>
|
||||
<HorizontalScrollDiv ref={(el) => this.setState({ contentRef: el })} className="content">
|
||||
<HorizontalScrollDiv
|
||||
ref={(el) => this.setState({ contentRef: el })}
|
||||
className={classNames("content", className)}
|
||||
>
|
||||
{renderedMarkdown}
|
||||
</HorizontalScrollDiv>
|
||||
</ErrorBoundary>
|
||||
|
||||
Reference in New Issue
Block a user