UNPKG

@jupyterlab/git

Version:

A JupyterLab extension for version control using git

51 lines (50 loc) 1.55 kB
import { TranslationBundle } from '@jupyterlab/translation'; import { CommandRegistry } from '@lumino/commands'; import * as React from 'react'; import { Git, IGitExtension } from '../tokens'; /** * Interface describing ComparisonBox component properties. */ export interface ICommitComparisonBoxProps { /** * Jupyter App commands registry. */ commands: CommandRegistry; /** * The commit to compare against. */ referenceCommit: Git.ISingleCommitInfo | null; /** * The commit to compare. */ challengerCommit: Git.ISingleCommitInfo | null; /** * Header text. */ header: string; /** * Extension data model. */ model: IGitExtension; /** * The application language translator. */ trans: TranslationBundle; /** * Returns a callback to be invoked on close. */ onClose: (event?: React.MouseEvent<HTMLElement, MouseEvent>) => void; /** * 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; } /** * A component which displays a comparison between two commits. */ export declare function CommitComparisonBox(props: ICommitComparisonBoxProps): JSX.Element;