File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ This is the custom rendering engine for Random Rants +. It allows us to build th
77
88## 🚀 Basic Usage
99To create an element, pass an array of objects to elements.createElementsFromJSON().
10-
10+ ``` javascript
1111const elements = require (' ./gp2/elements.js' );
1212
1313const myUI = elements .createElementsFromJSON ([
@@ -29,6 +29,7 @@ const myUI = elements.createElementsFromJSON([
2929]);
3030
3131document .body .append (... myUI);
32+ ```
3233
3334---
3435
@@ -48,6 +49,7 @@ document.body.append(...myUI);
4849## 🛠 Advanced Example: Interactive Component
4950Use GPWhenCreated and eventListeners to make things interactive.
5051
52+ ``` javascript
5153const chatInput = elements .createElementsFromJSON ([
5254 {
5355 element: " input" ,
@@ -65,6 +67,7 @@ const chatInput = elements.createElementsFromJSON([
6567 }
6668 }
6769]);
70+ ```
6871
6972---
7073
You can’t perform that action at this time.
0 commit comments