const configObj = {
headingText: '',
traitConfig: [
{
type: 'exp_text',
internalName: 'headingText',
displayName: 'Heading Text',
},
]
}
const CustomComponentWidget = Widget.createWidget({
component: CustomComponent,
label:"<div class='gjs-fonts gjs-f-b1 custom-widget'>Custom Component</div>",
category: 'Basic Components',
content: '<CustomComponent/>',
widgetName: 'CustomComponent',
widgetProperties: {
defaults: {
name: 'Custom Component',
attributes: {
component_content: JSON.stringify(configObj);
},
activeOnRender: true,
},
},
});