class ActionBlock { constructor(parent, df) { this.parent = parent; this.df = df || {}; this.make(); } make() { this.wrapper = $( `
`, ).appendTo(this.parent); this.wrapper.append(`
${this.df.title || ''}

${this.df.description || ''}

`); let action_button = $( `
`, ).appendTo(this.wrapper); action_button.append(` `); if (this.df.button.onclick) { $(action_button).on('click', () => { this.df.button.onclick(); }); } //TODO: handle button onclick event } }