import * as sfw from 'sfw'; const { Div, Img } = sfw.element.native; import Image from '../../widgets/image/index.js'; const css = await sfw.css(import.meta.url, './index.css') export default class ImageViewer extends sfw.element.Container { #container constructor() { super({ css }); this.onnewer = () => {} this.onolder = () => {} this.body.append( this.#container = Div.new({ id: 'container' }) ); } add(id) { this.#container.append(Image.new({ id })) } clear() { this.#container.innerHTML = ''; } }