UNPKG

dockview-solid

Version:

Zero dependency layout manager supporting tabs, grids and splitviews

21 lines (20 loc) 793 B
import { GridviewPanel, GridviewApi } from 'dockview-core'; import { SolidPart } from '../solid'; /** * SolidJS implementation of a grid panel view for Dockview gridview integration. */ export class SolidGridPanelView extends GridviewPanel { constructor(id, component, componentFn) { super(id, component); this.componentFn = componentFn; } getComponent() { var _a, _b; return new SolidPart(this.element, this.componentFn, { params: (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {}, api: this.api, // casting accessor to any to satisfy IGridviewComponent interface containerApi: new GridviewApi(this._params.accessor), }); } }