mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
♻️ Consolidate preview-HTML in a new setting type
This commit is contained in:
parent
4214821eb1
commit
d2f0cb1c31
8 changed files with 152 additions and 76 deletions
|
@ -8,7 +8,7 @@
|
|||
margin-right: -28px;
|
||||
|
||||
// Preview box showing a single button.
|
||||
&[data-ppcp-apm-preview] {
|
||||
&.ppcp-preview-single {
|
||||
height: 82px;
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
|
|
|
@ -349,8 +349,8 @@ document.addEventListener(
|
|||
*
|
||||
* Example: See the ppcp-google-pay "extensions.php" file.
|
||||
*/
|
||||
document.querySelectorAll('[data-ppcp-apm-preview]').forEach(item => {
|
||||
const apmName = item.dataset.ppcpApmPreview;
|
||||
document.querySelectorAll('[data-ppcp-preview-block]').forEach(item => {
|
||||
const apmName = item.dataset.ppcpPreviewBlock;
|
||||
const getSettings = buttonSettingsGetterFactory(apmName)
|
||||
const renderButtonPreview = buttonRefreshTriggerFactory(apmName);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue