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
|
@ -18,13 +18,6 @@ export default class ApplePayPreviewButton extends PreviewButton {
|
|||
};
|
||||
}
|
||||
|
||||
createNewWrapper() {
|
||||
const wrapper = super.createNewWrapper();
|
||||
wrapper.classList.add( 'ppcp-button-apm', 'ppcp-button-applepay' );
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
createButton( buttonConfig ) {
|
||||
const button = new ApplepayButton(
|
||||
'preview',
|
||||
|
|
|
@ -44,6 +44,7 @@ export default class ApplePayPreviewButtonManager extends PreviewButtonManager {
|
|||
return new ApplePayPreviewButton( {
|
||||
selector: wrapperId,
|
||||
apiConfig: this.apiConfig,
|
||||
methodName: this.methodName,
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue