@scm-manager/ui-components 2.31.1 → 2.31.2-20220124-105541

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,18 +33,7 @@ class ButtonGroup extends React.Component<Props> {
33
33
  render() {
34
34
  const { className, children } = this.props;
35
35
 
36
- const childWrapper: ReactNode[] = [];
37
- React.Children.forEach(children, (child) => {
38
- if (child) {
39
- childWrapper.push(
40
- <div className="control" key={childWrapper.length}>
41
- {child}
42
- </div>
43
- );
44
- }
45
- });
46
-
47
- return <div className={classNames("field", "is-grouped", className)}>{childWrapper}</div>;
36
+ return <div className={classNames("buttons", className)}>{children}</div>;
48
37
  }
49
38
  }
50
39
 
@@ -25,6 +25,7 @@ import React, { FC, useState } from "react";
25
25
  import styled from "styled-components";
26
26
  import InputField from "./InputField";
27
27
  import { AddButton } from "../buttons";
28
+ import { devices } from "../devices";
28
29
 
29
30
  type Props = {
30
31
  addEntry: (key: string, value: string) => void;
@@ -42,8 +43,15 @@ const FullWidthInputField = styled(InputField)`
42
43
  width: 100%;
43
44
  `;
44
45
 
45
- const MarginTopButton = styled(AddButton)`
46
- margin-top: 2rem;
46
+ const MobileWrappedDiv = styled.div`
47
+ @media screen and (min-width: ${devices.tablet.width}px) {
48
+ & > ${FullWidthInputField} {
49
+ margin-right: 1.5rem;
50
+ }
51
+ }
52
+ @media screen and (max-width: ${devices.mobile.width}px) {
53
+ flex-wrap: wrap;
54
+ }
47
55
  `;
48
56
 
49
57
  const AddKeyValueEntryToTableField: FC<Props> = ({
@@ -55,7 +63,7 @@ const AddKeyValueEntryToTableField: FC<Props> = ({
55
63
  valueHelpText,
56
64
  validateEntry,
57
65
  errorMessage,
58
- addEntry,
66
+ addEntry
59
67
  }) => {
60
68
  const [key, setKey] = useState("");
61
69
  const [value, setValue] = useState("");
@@ -75,9 +83,8 @@ const AddKeyValueEntryToTableField: FC<Props> = ({
75
83
  };
76
84
 
77
85
  return (
78
- <div className="is-flex is-justify-content-space-between">
86
+ <MobileWrappedDiv className="is-flex is-align-items-flex-end">
79
87
  <FullWidthInputField
80
- className="mr-5"
81
88
  label={keyFieldLabel}
82
89
  errorMessage={errorMessage}
83
90
  onChange={setKey}
@@ -88,7 +95,6 @@ const AddKeyValueEntryToTableField: FC<Props> = ({
88
95
  helpText={keyHelpText}
89
96
  />
90
97
  <FullWidthInputField
91
- className="mr-5"
92
98
  label={valueFieldLabel}
93
99
  errorMessage={errorMessage}
94
100
  onChange={setValue}
@@ -98,12 +104,13 @@ const AddKeyValueEntryToTableField: FC<Props> = ({
98
104
  disabled={disabled}
99
105
  helpText={valueHelpText}
100
106
  />
101
- <MarginTopButton
107
+ <AddButton
108
+ className="ml-auto mb-3"
102
109
  label={buttonLabel}
103
110
  action={add}
104
111
  disabled={disabled || !key || !value || !isValid(key) || !isValid(value)}
105
112
  />
106
- </div>
113
+ </MobileWrappedDiv>
107
114
  );
108
115
  };
109
116
 
@@ -51,11 +51,6 @@ const PageActionContainer = styled.div`
51
51
  }
52
52
  `;
53
53
 
54
- const MaxTitleHeight = styled.div`
55
- // remove blank space in repo create form
56
- height: 2.25rem;
57
- `;
58
-
59
54
  export default class Page extends React.Component<Props> {
60
55
  componentDidUpdate() {
61
56
  const textualTitle = this.getTextualTitle();
@@ -90,7 +85,7 @@ export default class Page extends React.Component<Props> {
90
85
 
91
86
  let pageActions = null;
92
87
  let pageActionsExists = false;
93
- React.Children.forEach(children, (child) => {
88
+ React.Children.forEach(children, child => {
94
89
  if (child && !error) {
95
90
  if (this.isPageAction(child)) {
96
91
  pageActions = (
@@ -118,10 +113,12 @@ export default class Page extends React.Component<Props> {
118
113
  <>
119
114
  <div className="columns">
120
115
  <div className="column">
121
- <MaxTitleHeight className="is-flex">
122
- <Title title={this.getTextualTitle()}>{this.getTitleComponent()}</Title>
123
- {afterTitle && <div className="ml-2">{afterTitle}</div>}
124
- </MaxTitleHeight>
116
+ <div className="is-flex is-flex-wrap-wrap is-align-items-center">
117
+ <Title className="mb-0 mr-2" title={this.getTextualTitle()}>
118
+ {this.getTitleComponent()}
119
+ </Title>
120
+ {afterTitle}
121
+ </div>
125
122
  {subtitle ? <Subtitle>{subtitle}</Subtitle> : null}
126
123
  </div>
127
124
  {pageActions}
@@ -144,7 +141,7 @@ export default class Page extends React.Component<Props> {
144
141
  }
145
142
 
146
143
  const content: ReactNode[] = [];
147
- React.Children.forEach(children, (child) => {
144
+ React.Children.forEach(children, child => {
148
145
  if (child) {
149
146
  if (!this.isPageAction(child)) {
150
147
  content.push(child);
@@ -0,0 +1,230 @@
1
+ /*
2
+ * MIT License
3
+ *
4
+ * Copyright (c) 2020-present Cloudogu GmbH and Contributors
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import React, { FC } from "react";
25
+ import { RouteComponentProps, withRouter } from "react-router-dom";
26
+ import unified from "unified";
27
+ import parseMarkdown from "remark-parse";
28
+ import sanitize from "rehype-sanitize";
29
+ import remark2rehype from "remark-rehype";
30
+ import rehype2react from "rehype-react";
31
+ import gfm from "remark-gfm";
32
+ import { BinderContext } from "@scm-manager/ui-extensions";
33
+ import ErrorBoundary from "../ErrorBoundary";
34
+ import { create as createMarkdownHeadingRenderer } from "./MarkdownHeadingRenderer";
35
+ import { create as createMarkdownLinkRenderer } from "./MarkdownLinkRenderer";
36
+ import { useTranslation, WithTranslation, withTranslation } from "react-i18next";
37
+ import Notification from "../Notification";
38
+ import { createTransformer as createChangesetShortlinkParser } from "./remarkChangesetShortLinkParser";
39
+ import { createTransformer as createValuelessTextAdapter } from "./remarkValuelessTextAdapter";
40
+ import MarkdownCodeRenderer from "./MarkdownCodeRenderer";
41
+ import { AstPlugin } from "./PluginApi";
42
+ import createMdastPlugin from "./createMdastPlugin";
43
+ // @ts-ignore
44
+ import gh from "hast-util-sanitize/lib/github";
45
+ import raw from "rehype-raw";
46
+ import slug from "rehype-slug";
47
+ import merge from "deepmerge";
48
+ import { createComponentList } from "./createComponentList";
49
+ import { ProtocolLinkRendererExtension, ProtocolLinkRendererExtensionMap } from "./markdownExtensions";
50
+
51
+ export type MarkdownProps = {
52
+ content: string;
53
+ renderContext?: object;
54
+ renderers?: any;
55
+ skipHtml?: boolean;
56
+ enableAnchorHeadings?: boolean;
57
+ // basePath for markdown links
58
+ basePath?: string;
59
+ permalink?: string;
60
+ mdastPlugins?: AstPlugin[];
61
+ };
62
+
63
+ type Props = RouteComponentProps & WithTranslation & MarkdownProps;
64
+
65
+ type State = {
66
+ contentRef: HTMLDivElement | null | undefined;
67
+ };
68
+
69
+ const xmlMarkupSample = `\`\`\`xml
70
+ <your>
71
+ <xml>
72
+ <content/>
73
+ </xml>
74
+ </your>
75
+ \`\`\``;
76
+
77
+ const MarkdownErrorNotification: FC = () => {
78
+ const [t] = useTranslation("commons");
79
+ return (
80
+ <Notification type="danger">
81
+ <div className="content">
82
+ <p className="subtitle">{t("markdownErrorNotification.title")}</p>
83
+ <p>{t("markdownErrorNotification.description")}</p>
84
+ <pre>
85
+ <code>{xmlMarkupSample}</code>
86
+ </pre>
87
+ <p>
88
+ {t("markdownErrorNotification.spec")}:{" "}
89
+ <a href="https://github.github.com/gfm/" target="_blank" rel="noreferrer">
90
+ GitHub Flavored Markdown Spec
91
+ </a>
92
+ </p>
93
+ </div>
94
+ </Notification>
95
+ );
96
+ };
97
+
98
+ class LazyMarkdownView extends React.Component<Props, State> {
99
+ static contextType = BinderContext;
100
+
101
+ static defaultProps: Partial<Props> = {
102
+ enableAnchorHeadings: false,
103
+ skipHtml: false
104
+ };
105
+
106
+ constructor(props: Props) {
107
+ super(props);
108
+ this.state = {
109
+ contentRef: null
110
+ };
111
+ }
112
+
113
+ shouldComponentUpdate(nextProps: Readonly<Props>, nextState: Readonly<State>): boolean {
114
+ // We have check if the contentRef changed and update afterwards so the page can scroll to the anchor links.
115
+ // Otherwise it can happen that componentDidUpdate is never executed depending on how fast the markdown got rendered
116
+ // We also have to check if props have changed, because we also want to rerender if one of our props has changed
117
+ return this.state.contentRef !== nextState.contentRef || this.props !== nextProps;
118
+ }
119
+
120
+ componentDidUpdate() {
121
+ const { contentRef } = this.state;
122
+ // we have to use componentDidUpdate, because we have to wait until all
123
+ // children are rendered and componentDidMount is called before the
124
+ // markdown content was rendered.
125
+ const hash = this.props.location.hash;
126
+ if (contentRef && hash) {
127
+ // we query only child elements, to avoid strange scrolling with multiple
128
+ // markdown elements on one page.
129
+ const elementId = decodeURIComponent(hash.substring(1) /* remove # */);
130
+ const element = contentRef.querySelector(`[id="${elementId}"]`);
131
+ if (element && element.scrollIntoView) {
132
+ element.scrollIntoView();
133
+ }
134
+ }
135
+ }
136
+
137
+ render() {
138
+ const {
139
+ content,
140
+ renderers,
141
+ renderContext,
142
+ enableAnchorHeadings,
143
+ skipHtml,
144
+ basePath,
145
+ permalink,
146
+ t,
147
+ mdastPlugins = []
148
+ } = this.props;
149
+
150
+ const rendererFactory = this.context.getExtension("markdown-renderer-factory");
151
+ let remarkRendererList = renderers;
152
+
153
+ if (rendererFactory) {
154
+ remarkRendererList = rendererFactory(renderContext);
155
+ }
156
+
157
+ if (!remarkRendererList) {
158
+ remarkRendererList = {};
159
+ }
160
+
161
+ if (enableAnchorHeadings && permalink && !remarkRendererList.heading) {
162
+ remarkRendererList.heading = createMarkdownHeadingRenderer(permalink);
163
+ }
164
+
165
+ let protocolLinkRendererExtensions: ProtocolLinkRendererExtensionMap = {};
166
+ if (!remarkRendererList.link) {
167
+ const extensionPoints = this.context.getExtensions(
168
+ "markdown-renderer.link.protocol"
169
+ ) as ProtocolLinkRendererExtension[];
170
+ protocolLinkRendererExtensions = extensionPoints.reduce<ProtocolLinkRendererExtensionMap>(
171
+ (prev, { protocol, renderer }) => {
172
+ prev[protocol] = renderer;
173
+ return prev;
174
+ },
175
+ {}
176
+ );
177
+ remarkRendererList.link = createMarkdownLinkRenderer(basePath, protocolLinkRendererExtensions);
178
+ }
179
+
180
+ if (!remarkRendererList.code) {
181
+ remarkRendererList.code = MarkdownCodeRenderer;
182
+ }
183
+
184
+ const remarkPlugins = [...mdastPlugins, createChangesetShortlinkParser(t), createValuelessTextAdapter()].map(
185
+ createMdastPlugin
186
+ );
187
+
188
+ let processor = unified()
189
+ .use(parseMarkdown)
190
+ .use(gfm)
191
+ .use(remarkPlugins)
192
+ .use(remark2rehype, { allowDangerousHtml: true });
193
+
194
+ if (!skipHtml) {
195
+ processor = processor.use(raw);
196
+ }
197
+
198
+ processor = processor
199
+ .use(slug)
200
+ .use(
201
+ sanitize,
202
+ merge(gh, {
203
+ attributes: {
204
+ code: ["className"] // Allow className for code elements, this is necessary to extract the code language
205
+ },
206
+ clobberPrefix: "", // Do not prefix user-provided ids and class names,
207
+ protocols: {
208
+ href: Object.keys(protocolLinkRendererExtensions)
209
+ }
210
+ })
211
+ )
212
+ .use(rehype2react, {
213
+ createElement: React.createElement,
214
+ passNode: true,
215
+ components: createComponentList(remarkRendererList, { permalink })
216
+ });
217
+
218
+ const renderedMarkdown: any = processor.processSync(content).result;
219
+
220
+ return (
221
+ <ErrorBoundary fallback={MarkdownErrorNotification}>
222
+ <div ref={el => this.setState({ contentRef: el })} className="content is-word-break">
223
+ {renderedMarkdown}
224
+ </div>
225
+ </ErrorBoundary>
226
+ );
227
+ }
228
+ }
229
+
230
+ export default withRouter(withTranslation("repos")(LazyMarkdownView));
@@ -21,209 +21,16 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import React, { FC } from "react";
25
- import { RouteComponentProps, withRouter } from "react-router-dom";
26
- import unified from "unified";
27
- import parseMarkdown from "remark-parse";
28
- import sanitize from "rehype-sanitize";
29
- import remark2rehype from "remark-rehype";
30
- import rehype2react from "rehype-react";
31
- import gfm from "remark-gfm";
32
- import { BinderContext } from "@scm-manager/ui-extensions";
33
- import ErrorBoundary from "../ErrorBoundary";
34
- import { create as createMarkdownHeadingRenderer } from "./MarkdownHeadingRenderer";
35
- import { create as createMarkdownLinkRenderer } from "./MarkdownLinkRenderer";
36
- import { useTranslation, WithTranslation, withTranslation } from "react-i18next";
37
- import Notification from "../Notification";
38
- import { createTransformer as createChangesetShortlinkParser } from "./remarkChangesetShortLinkParser";
39
- import { createTransformer as createValuelessTextAdapter } from "./remarkValuelessTextAdapter";
40
- import MarkdownCodeRenderer from "./MarkdownCodeRenderer";
41
- import { AstPlugin } from "./PluginApi";
42
- import createMdastPlugin from "./createMdastPlugin";
43
- // @ts-ignore
44
- import gh from "hast-util-sanitize/lib/github";
45
- import raw from "rehype-raw";
46
- import slug from "rehype-slug";
47
- import merge from "deepmerge";
48
- import { createComponentList } from "./createComponentList";
49
- import { ProtocolLinkRendererExtension, ProtocolLinkRendererExtensionMap } from "./markdownExtensions";
24
+ import React, { FC, Suspense } from "react";
25
+ import { MarkdownProps } from "./LazyMarkdownView";
26
+ import Loading from "../Loading";
50
27
 
51
- type Props = RouteComponentProps &
52
- WithTranslation & {
53
- content: string;
54
- renderContext?: object;
55
- renderers?: any;
56
- skipHtml?: boolean;
57
- enableAnchorHeadings?: boolean;
58
- // basePath for markdown links
59
- basePath?: string;
60
- permalink?: string;
61
- mdastPlugins?: AstPlugin[];
62
- };
28
+ const LazyMarkdownView = React.lazy(() => import("./LazyMarkdownView"));
63
29
 
64
- type State = {
65
- contentRef: HTMLDivElement | null | undefined;
66
- };
30
+ const MarkdownView: FC<MarkdownProps> = props => (
31
+ <Suspense fallback={<Loading />}>
32
+ <LazyMarkdownView {...props} />
33
+ </Suspense>
34
+ );
67
35
 
68
- const xmlMarkupSample = `\`\`\`xml
69
- <your>
70
- <xml>
71
- <content/>
72
- </xml>
73
- </your>
74
- \`\`\``;
75
-
76
- const MarkdownErrorNotification: FC = () => {
77
- const [t] = useTranslation("commons");
78
- return (
79
- <Notification type="danger">
80
- <div className="content">
81
- <p className="subtitle">{t("markdownErrorNotification.title")}</p>
82
- <p>{t("markdownErrorNotification.description")}</p>
83
- <pre>
84
- <code>{xmlMarkupSample}</code>
85
- </pre>
86
- <p>
87
- {t("markdownErrorNotification.spec")}:{" "}
88
- <a href="https://github.github.com/gfm/" target="_blank" rel="noreferrer">
89
- GitHub Flavored Markdown Spec
90
- </a>
91
- </p>
92
- </div>
93
- </Notification>
94
- );
95
- };
96
-
97
- class MarkdownView extends React.Component<Props, State> {
98
- static contextType = BinderContext;
99
-
100
- static defaultProps: Partial<Props> = {
101
- enableAnchorHeadings: false,
102
- skipHtml: false,
103
- };
104
-
105
- constructor(props: Props) {
106
- super(props);
107
- this.state = {
108
- contentRef: null,
109
- };
110
- }
111
-
112
- shouldComponentUpdate(nextProps: Readonly<Props>, nextState: Readonly<State>): boolean {
113
- // We have check if the contentRef changed and update afterwards so the page can scroll to the anchor links.
114
- // Otherwise it can happen that componentDidUpdate is never executed depending on how fast the markdown got rendered
115
- // We also have to check if props have changed, because we also want to rerender if one of our props has changed
116
- return this.state.contentRef !== nextState.contentRef || this.props !== nextProps;
117
- }
118
-
119
- componentDidUpdate() {
120
- const { contentRef } = this.state;
121
- // we have to use componentDidUpdate, because we have to wait until all
122
- // children are rendered and componentDidMount is called before the
123
- // markdown content was rendered.
124
- const hash = this.props.location.hash;
125
- if (contentRef && hash) {
126
- // we query only child elements, to avoid strange scrolling with multiple
127
- // markdown elements on one page.
128
- const elementId = decodeURIComponent(hash.substring(1) /* remove # */);
129
- const element = contentRef.querySelector(`[id="${elementId}"]`);
130
- if (element && element.scrollIntoView) {
131
- element.scrollIntoView();
132
- }
133
- }
134
- }
135
-
136
- render() {
137
- const {
138
- content,
139
- renderers,
140
- renderContext,
141
- enableAnchorHeadings,
142
- skipHtml,
143
- basePath,
144
- permalink,
145
- t,
146
- mdastPlugins = [],
147
- } = this.props;
148
-
149
- const rendererFactory = this.context.getExtension("markdown-renderer-factory");
150
- let remarkRendererList = renderers;
151
-
152
- if (rendererFactory) {
153
- remarkRendererList = rendererFactory(renderContext);
154
- }
155
-
156
- if (!remarkRendererList) {
157
- remarkRendererList = {};
158
- }
159
-
160
- if (enableAnchorHeadings && permalink && !remarkRendererList.heading) {
161
- remarkRendererList.heading = createMarkdownHeadingRenderer(permalink);
162
- }
163
-
164
- let protocolLinkRendererExtensions: ProtocolLinkRendererExtensionMap = {};
165
- if (!remarkRendererList.link) {
166
- const extensionPoints = this.context.getExtensions(
167
- "markdown-renderer.link.protocol"
168
- ) as ProtocolLinkRendererExtension[];
169
- protocolLinkRendererExtensions = extensionPoints.reduce<ProtocolLinkRendererExtensionMap>(
170
- (prev, { protocol, renderer }) => {
171
- prev[protocol] = renderer;
172
- return prev;
173
- },
174
- {}
175
- );
176
- remarkRendererList.link = createMarkdownLinkRenderer(basePath, protocolLinkRendererExtensions);
177
- }
178
-
179
- if (!remarkRendererList.code) {
180
- remarkRendererList.code = MarkdownCodeRenderer;
181
- }
182
-
183
- const remarkPlugins = [...mdastPlugins, createChangesetShortlinkParser(t), createValuelessTextAdapter()].map(
184
- createMdastPlugin
185
- );
186
-
187
- let processor = unified()
188
- .use(parseMarkdown)
189
- .use(gfm)
190
- .use(remarkPlugins)
191
- .use(remark2rehype, { allowDangerousHtml: true });
192
-
193
- if (!skipHtml) {
194
- processor = processor.use(raw);
195
- }
196
-
197
- processor = processor
198
- .use(slug)
199
- .use(
200
- sanitize,
201
- merge(gh, {
202
- attributes: {
203
- code: ["className"], // Allow className for code elements, this is necessary to extract the code language
204
- },
205
- clobberPrefix: "", // Do not prefix user-provided ids and class names,
206
- protocols: {
207
- href: Object.keys(protocolLinkRendererExtensions),
208
- },
209
- })
210
- )
211
- .use(rehype2react, {
212
- createElement: React.createElement,
213
- passNode: true,
214
- components: createComponentList(remarkRendererList, { permalink }),
215
- });
216
-
217
- const renderedMarkdown: any = processor.processSync(content).result;
218
-
219
- return (
220
- <ErrorBoundary fallback={MarkdownErrorNotification}>
221
- <div ref={(el) => this.setState({ contentRef: el })} className="content is-word-break">
222
- {renderedMarkdown}
223
- </div>
224
- </ErrorBoundary>
225
- );
226
- }
227
- }
228
-
229
- export default withRouter(withTranslation("repos")(MarkdownView));
36
+ export default MarkdownView;
@@ -25,6 +25,7 @@ import React, { FC, MutableRefObject, useRef } from "react";
25
25
  import classNames from "classnames";
26
26
  import styled from "styled-components";
27
27
  import { Dialog } from "@headlessui/react";
28
+ import { devices } from "../devices";
28
29
 
29
30
  type ModalSize = "S" | "M" | "L";
30
31
 
@@ -47,6 +48,9 @@ type Props = {
47
48
  const SizedModal = styled.div<{ size?: ModalSize; overflow: string }>`
48
49
  width: ${props => (props.size ? `${modalSizes[props.size]}%` : "640px")};
49
50
  overflow: ${props => props.overflow};
51
+ @media screen and (max-width: ${devices.mobile.width}px) {
52
+ width: ${props => (props.size ? `${modalSizes[props.size]}%` : "320px")};
53
+ }
50
54
  `;
51
55
 
52
56
  export const Modal: FC<Props> = ({
@@ -64,14 +64,14 @@ const Diff: FC<Props> = ({ diff, ...fileProps }) => {
64
64
  {diff.length === 0 ? (
65
65
  <Notification type="info">{t("diff.noDiffFound")}</Notification>
66
66
  ) : (
67
- diff.map((file) => <DiffFile key={createKey(file)} file={file} {...fileProps} />)
67
+ diff.map(file => <DiffFile key={createKey(file)} file={file} {...fileProps} />)
68
68
  )}
69
69
  </div>
70
70
  );
71
71
  };
72
72
 
73
73
  Diff.defaultProps = {
74
- sideBySide: false,
74
+ sideBySide: false
75
75
  };
76
76
 
77
77
  export default Diff;