♻️ Consolidate preview-HTML in a new setting type

This commit is contained in:
Philipp Stracker 2024-06-27 18:00:37 +02:00
parent 4214821eb1
commit d2f0cb1c31
No known key found for this signature in database
8 changed files with 152 additions and 76 deletions

View file

@ -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) {

View file

@ -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);