@jupyterlab/git
Version:
A JupyterLab extension for version control using git
53 lines (52 loc) • 1.35 kB
TypeScript
import { TranslationBundle } from '@jupyterlab/translation';
import * as React from 'react';
import { Git } from '../tokens';
/**
* CommitDiff component properties
*/
export interface ICommitDiffProps {
/**
* Global actions on the commit diff
*/
actions?: JSX.Element;
/**
* Class name
*/
className?: string;
/**
* Number of modified files.
*/
numFiles: string;
/**
* Number of insertions.
*/
insertions: string;
/**
* Number of deletions.
*/
deletions: string;
/**
* A list of modified files.
*/
files: Git.ICommitModifiedFile[];
/**
* The application language translator.
*/
trans: TranslationBundle;
/**
* Returns a callback to be invoked on click to display a file diff.
*
* @param filePath file path
* @param isText indicates whether the file supports displaying a diff
* @param previousFilePath when file has been relocated
* @returns callback
*/
onOpenDiff: (filePath: string, isText: boolean, previousFilePath?: string) => (event?: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
}
/**
* Display differences between two commits
*/
export declare class CommitDiff extends React.PureComponent<ICommitDiffProps> {
render(): JSX.Element;
private _renderFile;
}