Browse Source

Move EditorView to TS

pull/4746/head
Artur Arseniev 4 years ago
parent
commit
3ca4b3efb3
  1. 7
      src/code_manager/view/EditorView.ts

7
src/code_manager/view/EditorView.js → src/code_manager/view/EditorView.ts

@ -2,7 +2,10 @@ import { View } from '../../common';
import html from '../../utils/html'; import html from '../../utils/html';
export default class EditorView extends View { export default class EditorView extends View {
template({ pfx, codeName, label }) { pfx?: string;
config!: Record<string, any>;
template({ pfx, codeName, label }: { pfx: string; codeName: string; label: string }) {
return html` return html`
<div class="${pfx}editor" id="${pfx}${codeName}"> <div class="${pfx}editor" id="${pfx}${codeName}">
<div id="${pfx}title">${label}</div> <div id="${pfx}title">${label}</div>
@ -11,7 +14,7 @@ export default class EditorView extends View {
`; `;
} }
initialize(o) { initialize(o: any) {
this.config = o.config || {}; this.config = o.config || {};
this.pfx = this.config.stylePrefix; this.pfx = this.config.stylePrefix;
} }
Loading…
Cancel
Save