import { IgniteElement } from './ignite-element.js'; import { IgniteTemplate, div, html, list, a } from './ignite-template.js'; class Sheet extends IgniteElement { constructor() { super(); this.show = false; this.items = []; this.href = "www.google.com"; } properties() { return [ "show", "name", "items", "href" ]; } render() { return this.template .class(this.show) .child( new div( new html("

this is before

"), new list(this.items, (item) => { return new a(`${item}`).attribute("href", this.href) }), new html("

this is after

"), new a("this is a link").attribute("href", this.href) ) ); } } class SheetTemplate extends IgniteTemplate { constructor(...items) { super(items); this.tagName = "md-sheet"; } } customElements.define("md-sheet", Sheet); export { SheetTemplate as Sheet };