dockview
Version:
React docking layout manager — tabs, groups, grids, splitviews, drag and drop, floating panels
23 lines (22 loc) • 730 B
JavaScript
import { ReactPart } from '../react';
export class ReactContextMenuItemPart {
get element() {
return this._element;
}
constructor(id, component, reactPortalStore) {
this.id = id;
this.component = component;
this.reactPortalStore = reactPortalStore;
this._element = document.createElement('div');
this._element.className = 'dv-react-part';
this._element.style.height = '100%';
this._element.style.width = '100%';
}
init(props) {
this.part = new ReactPart(this._element, this.reactPortalStore, this.component, props);
}
dispose() {
var _a;
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
}
}