@jupyterlab/docregistry
Version:
JupyterLab - Document Registry
17 lines • 863 B
JavaScript
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/
import { ReactWidget } from '@jupyterlab/apputils';
import { nullTranslator } from '@jupyterlab/translation';
import * as React from 'react';
/**
* create readonly label toolbar item
*/
export function createReadonlyLabel(panel, translator) {
var _a;
let trans = (translator !== null && translator !== void 0 ? translator : nullTranslator).load('jupyterlab');
return ReactWidget.create(React.createElement("div", null,
React.createElement("span", { className: "jp-ToolbarLabelComponent", title: trans.__(`Document is read-only. "Save" is disabled; use "Save as…" instead`) }, trans.__(`%1 is read-only`, (_a = panel.context.contentsModel) === null || _a === void 0 ? void 0 : _a.type))));
}
//# sourceMappingURL=components.js.map