From a76ae76fb0b3bc40b46947434bdd4b64e687b2ba Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sat, 12 Sep 2020 16:31:55 +0200 Subject: [PATCH] feat(core): Added info type to raise method --- packages/core/src/pattern.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/core/src/pattern.js b/packages/core/src/pattern.js index 6eaf072a099..2575c579d47 100644 --- a/packages/core/src/pattern.js +++ b/packages/core/src/pattern.js @@ -13,12 +13,16 @@ import { version } from '../package.json' export default function Pattern(config = { options: {} }) { // Events store and raise methods this.events = { + info: [], warning: [], error: [], debug: [] } const events = this.events this.raise = { + info: function (data) { + events.info.push(data) + }, warning: function (data) { events.warning.push(data) }, @@ -635,6 +639,7 @@ Pattern.prototype.getRenderProps = function () { props.settings = this.settings props.events = { debug: this.events.debug, + info: this.events.info, warning: this.events.warning, error: this.events.error }