Return the style object from the single product config too

This commit is contained in:
Mészáros Róbert 2020-04-09 19:30:14 +03:00
parent 3f8b3ba85c
commit 42fe525a0b

View file

@ -1,6 +1,7 @@
import ButtonsToggleListener from "./ButtonsToggleListener"; import ButtonsToggleListener from './ButtonsToggleListener';
import Product from "./Product"; import Product from './Product';
import onApprove from "./onApproveForContinue"; import onApprove from './onApproveForContinue';
class SingleProductConfig { class SingleProductConfig {
constructor( constructor(
@ -31,12 +32,15 @@ class SingleProductConfig {
observer.init(); observer.init();
} }
const style = this.config.button.style;
return { return {
createOrder: this.createOrder(), createOrder: this.createOrder(),
onApprove: onApprove(this), onApprove: onApprove(this),
onError: (error) => { onError: (error) => {
this.errorHandler.message(error); this.errorHandler.message(error);
} },
style,
} }
} }