-
-
Save parzibyte/269ab72be1f3a0aec4c2ca759a558b71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
didOpen: () => { | |
const input = Swal.getInput() | |
const $cambio = Swal.getHtmlContainer().querySelector( | |
"#cambio"); | |
input.oninput = () => { | |
$cambio.textContent = ""; | |
const cambio = parseFloat(input.value) - TOTAL_VENTA; | |
if (cambio > 0) { | |
$cambio.textContent = `$${cambio.toFixed(2)}`; | |
} | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment