UNPKG

@universal-material/web

Version:
25 lines 900 B
import { __decorate } from "tslib"; import { html, LitElement, render } from 'lit'; import { customElement, property } from 'lit/decorators.js'; let TypeaheadTemplateRender = class TypeaheadTemplateRender extends LitElement { constructor() { super(...arguments); this.content = null; } render() { if (this.content instanceof HTMLElement || typeof this.content === 'string') { return html `${this.content}`; } const container = document.createElement('div'); render(this.content, container); return html `${container}`; } }; __decorate([ property() ], TypeaheadTemplateRender.prototype, "content", void 0); TypeaheadTemplateRender = __decorate([ customElement('u-typeahead-template-render') ], TypeaheadTemplateRender); export { TypeaheadTemplateRender }; //# sourceMappingURL=typeahead-template-render.js.map