1 |
|
2 |
|
3 |
|
4 |
|
5 | import { ReactWidget } from '@jupyterlab/apputils';
|
6 | import { nullTranslator } from '@jupyterlab/translation';
|
7 | import * as React from 'react';
|
8 |
|
9 |
|
10 |
|
11 | export function createReadonlyLabel(panel, translator) {
|
12 | var _a;
|
13 | let trans = (translator !== null && translator !== void 0 ? translator : nullTranslator).load('jupyterlab');
|
14 | return ReactWidget.create(React.createElement("div", null,
|
15 | 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))));
|
16 | }
|
17 |
|
\ | No newline at end of file |