Skip to content

Instantly share code, notes, and snippets.

Created December 16, 2019 18:56
What would you like to do?
title: "Tu nombre",
input: "text",
showCancelButton: true,
confirmButtonText: "Guardar",
cancelButtonText: "Cancelar",
inputValidator: nombre => {
// Si el valor es válido, debes regresar undefined. Si no, una cadena
if (!nombre) {
return "Por favor escribe tu nombre";
} else {
return undefined;
.then(resultado => {
if (resultado.value) {
let nombre = resultado.value;
console.log("Hola, " + nombre);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment