Home Reference Source

cables_dev/cables_ui/src/ui/components/tabs/tab_html.js

  1. import { Events } from "cables-shared-client";
  2. import Tab from "../../elements/tabpanel/tab.js";
  3.  
  4. /**
  5. *simple tab to just show html
  6. *
  7. * @export
  8. * @class HtmlTab
  9. * @extends {Events}
  10. */
  11. export default class HtmlTab extends Events
  12. {
  13. constructor(tabs, html, title, options = {})
  14. {
  15. super();
  16. this._tabs = tabs || gui.mainTabs;
  17.  
  18. this._tab = new Tab(title, { "icon": options.icon || "list", "infotext": "tab_logging", "padding": true, "singleton": "true", });
  19. this._tabs.addTab(this._tab, true);
  20. gui.maintabPanel.show(true);
  21.  
  22. this._tab.html(html);
  23. }
  24. }