mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
♻️ Consolidate the preview button’s CSS classes
Class names are now generated by the base class. This allows to remove a method from all derived classes
This commit is contained in:
parent
7f9cbd6f58
commit
4cde024320
6 changed files with 20 additions and 19 deletions
|
@ -20,13 +20,6 @@ export default class GooglePayPreviewButton extends PreviewButton {
|
|||
};
|
||||
}
|
||||
|
||||
createNewWrapper() {
|
||||
const wrapper = super.createNewWrapper();
|
||||
wrapper.classList.add( 'ppcp-button-apm', 'ppcp-button-googlepay' );
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
createButton( buttonConfig ) {
|
||||
const button = new GooglepayButton(
|
||||
'preview',
|
||||
|
|
|
@ -51,6 +51,7 @@ export default class GooglePayPreviewButtonManager extends PreviewButtonManager
|
|||
return new GooglePayPreviewButton( {
|
||||
selector: wrapperId,
|
||||
apiConfig: this.apiConfig,
|
||||
methodName: this.methodName,
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue