all repos — h3 @ af1f1a5943e809b4a5ebd7a4ef13c8dc612ed5dc

A tiny, extremely minimalist JavaScript microframework.

example/assets/js/components/navigationBar.js

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
import h3 from "../h3.js";
import Paginator from "./paginator.js";

export default function NavigationBar(data, actions) {
  const { filter, paginatorData } = data;
  const { setFilter, update } = actions;
  return h3("div.navigation-bar", [
    h3("input", {
      id: "filter-text",
      placeholder: "Type to filter todo items...",
      onkeyup: setFilter,
      value: filter,
    }),
    Paginator(paginatorData, { update }),
  ]);
}