fixing - pay button width

- realised the pay button width function didn't actually exist so added it in
This commit is contained in:
Farah
2022-10-09 01:21:59 +01:00
parent 5f80cf8126
commit 370dc2eed2
3 changed files with 18 additions and 1 deletions

View File

@@ -916,6 +916,7 @@ a:hover {
--text-align: left;
--text-bold: normal;
--text-italic: normal;
--payButton-width: 100%;
}
@@ -945,6 +946,14 @@ a:hover {
border-radius: var(--button-edges) !important;
}
.adyen-checkout__button.adyen-checkout__button--pay {
width: var(--payButton-width) !important;
margin-right: auto;
margin-left: auto;
display: flex;
justify-content: center;
}
.form-group {
width: 250px;
/* Full-width */

View File

@@ -588,6 +588,7 @@ function resetDynamicCSS () {
r.style.setProperty('--text-bold', null);
r.style.setProperty('--text-italic', null);
r.style.setProperty('--text-align', null);
r.style.setProperty('--payButton-width', null);
}
function dropinWidth () {
@@ -597,6 +598,13 @@ function dropinWidth () {
console.log(widthpx)
}
function payButtonWidth () {
let payWidthValue = document.getElementById("payButtonWidth").value
let payWidthpx = payWidthValue + 'px'
r.style.setProperty('--payButton-width', payWidthpx);
console.log(widthpx)
}
function fontWidth () {
let fontValue = document.getElementById("fontSize").value
let fontpx = fontValue + 'px'

View File

@@ -566,7 +566,7 @@
<!-- toggle -->
<div class="col-2 text-right">
<div class="form-group">
<input type="range" class="form-control-range" id="changeWidth" min="300" max="700" value="500" onchange="dropinWidth(this.value)">
<input type="range" class="form-control-range" id="payButtonWidth" min="265" max="665" value="100%" onchange="payButtonWidth(this.value)">
</div>
</div>
</div>