Skip to content

Instantly share code, notes, and snippets.

@mikaelbr
Created September 30, 2019 18:12
Show Gist options
  • Save mikaelbr/7fbc94d0edc1c21a39c7e76bebb92d27 to your computer and use it in GitHub Desktop.
Save mikaelbr/7fbc94d0edc1c21a39c7e76bebb92d27 to your computer and use it in GitHub Desktop.
const { main, header, h1, h2 } = createUiFramework();
// Create my component with a similar signature
let myHeader = (props, children) =>
header(props, [children, h2("... a greeting blog")]);
// Use custom component
document.body.appendChild(
main({},
myHeader({ class: "header" }, h1("Hello, world!")))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment