UNPKG

@salla.sa/twilight-components

Version:
31 lines (27 loc) 889 B
/*! * Crafted with ❤ by Salla */ 'use strict'; var index = require('./index-uoA36zqH.js'); const SallaHook = class { constructor(hostRef) { index.registerInstance(this, hostRef); } /** * Mounts a given HTML element into the hook position. * @param element The element to inject. */ async mount(element) { this.host.before(element); } render() { return index.h(index.Host, { key: '499483c55f2e1122d80768cd43e47f8e127a62b4' }); } async componentDidLoad() { // Register this component for hooks system, already on it logic to run componentDidLoad trigger await Salla.hooks.registerComponent('salla-hook', this); } get host() { return index.getElement(this); } }; SallaHook.style = ":host {\n all: unset;\n display: none; /* marker only */\n }"; exports.salla_hook = SallaHook;