constructor()

in codelab-final-state/public/js/view.js [140:156]


  constructor(icons) {
    icons = icons || [];

    const logoEl = el("div.logo", [el("img", { src: "img/sparky.png" })]);

    const textEl = el("div.text", [
      el("p.title", "The Fire Store"),
      el("p.subtitle", "Your one-stop shop for fire sales!")
    ]);

    for (const icon of icons) {
      this.icons[icon.id] = icon;
    }

    const iconsEl = el("div.icons ", icons);
    this.el = el("div#header", [logoEl, textEl, iconsEl]);
  }