UNPKG

@jupyterlab/git

Version:

A JupyterLab extension for version control using git

54 lines (53 loc) 1.43 kB
import { TranslationBundle } from '@jupyterlab/translation'; import { CommandRegistry } from '@lumino/commands'; import * as React from 'react'; import { IGitExtension } from '../tokens'; /** * Interface describing properties. */ export interface IToolbarProps { /** * Jupyter App commands registry */ commands: CommandRegistry; /** * Git extension data model. */ model: IGitExtension; /** * The application language translator. */ trans: TranslationBundle; } /** * Interface describing component state. */ export interface IToolbarState { /** * Boolean indicating whether a refresh is currently in progress. */ refreshInProgress: boolean; /** * Boolean indicating whether the repository menu is shown. */ repoMenu: boolean; } export declare class Toolbar extends React.Component<IToolbarProps, IToolbarState> { constructor(props: IToolbarProps); render(): React.ReactElement; private _renderToolbarRow; private _renderRepoLabel; private _renderRepoButton; private _renderBranchInfo; private _renderRemoteActions; private _renderSubmodules; private _getRepositoryName; private _getFullRepositoryPath; private _onPullClick; private _onPushClick; private _onRepoClick; /** * Callback invoked upon clicking a button to refresh the model. */ private _onRefreshClick; }