mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add button preview in settings
This commit is contained in:
parent
e347bd8416
commit
ab618b200e
13 changed files with 294 additions and 19 deletions
9
modules/ppcp-wc-gateway/resources/js/helper/debounce.js
Normal file
9
modules/ppcp-wc-gateway/resources/js/helper/debounce.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
export const debounce = (callback, delayMs) => {
|
||||
let timeoutId = null;
|
||||
return (...args) => {
|
||||
window.clearTimeout(timeoutId);
|
||||
timeoutId = window.setTimeout(() => {
|
||||
callback.apply(null, args);
|
||||
}, delayMs);
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue