mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
28 lines
508 B
JavaScript
28 lines
508 B
JavaScript
//@flow
|
|
import React from "react";
|
|
import DiffFile from "./DiffFile";
|
|
import type { DiffObjectProps } from "./DiffTypes";
|
|
|
|
type Props = DiffObjectProps & {
|
|
diff: any
|
|
};
|
|
|
|
class Diff extends React.Component<Props> {
|
|
static defaultProps = {
|
|
sideBySide: false
|
|
};
|
|
|
|
render() {
|
|
const { diff, ...fileProps } = this.props;
|
|
return (
|
|
<>
|
|
{diff.map((file, index) => (
|
|
<DiffFile key={index} file={file} {...fileProps} />
|
|
))}
|
|
</>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default Diff;
|