Brijesh's Git Server — web-components-demo @ main

this is for demo, will be deleted soon

component.js (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
const myComponentTemplate = `
  <div class="min-w-96 mb-4 p-4 border border-gray-300 rounded-lg">
    <h2 class="text-xl font-bold mb-2">{{title}}</h2>
    <p class="text-gray-600">{{content}}</p>
  </div>
`;

createWebComponent("my-component", myComponentTemplate, ["title", "content"]);