-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUserLib.js
28 lines (21 loc) · 919 Bytes
/
UserLib.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$(function() {
//Wait for Pinegrow to wake-up
$("body").one("pinegrow-ready", function(e, pinegrow) {
//Create new Pinegrow framework object
var f = new PgFramework("UserLib", "UserLib");
//This will prevent activating multiple versions of this framework being loaded
f.type = "UserLib";
f.allow_single_type = true;
f.user_lib = true
var comp_comp1 = new PgComponentType('comp1', 'Comp 1 / p');
comp_comp1.code = '<p>HashiCorp Terraform Associate</p>';
comp_comp1.parent_selector = null;
f.addComponentType(comp_comp1);
//Tell Pinegrow about the framework
pinegrow.addFramework(f);
var section = new PgFrameworkLibSection("UserLib_lib", "Components");
//Pass components in array
section.setComponentTypes([comp_comp1]);
f.addLibSection(section);
});
});