JSFiddle - React, Tailwind, and code Playground
CSS
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300);
.sweet-overlay {
background-color: rgba(0, 0, 0, 0.4);
position: fixed;
display: none;
z-index: 1000;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.sweet-alert {
background-color: white;
font-family: 'Open Sans', sans-serif;
width: 478px;
padding: 17px;
border-radius: 5px;
text-align: center;
position: fixed;
left: 50%;
top: 50%;
margin-left: -256px;
margin-top: -200px;
overflow: hidden;
display: none;
z-index: 2000; }
@media all and (max-width: 540px) {
.sweet-alert {
width: auto;
margin-left: 0;
margin-right: 0;
left: 15px;
right: 15px; } }
.sweet-alert h2 {
color: #575757;
font-size: 30px;
text-align: center;
font-weight: 600;
text-transform: none;
position: relative;
margin: 25px 0;
padding: 0;
line-height: 25px;
display: block; }
.sweet-alert p {
color: #797979;
font-size: 16px;
text-align: center;
font-weight: 300;
position: relative;
margin: 0;
padding: 0;
line-height: normal; }
.sweet-alert button {
background-color: #AEDEF4;
color: white;
border: none;
box-shadow: none;
font-size: 17px;
font-weight: 500;
border-radius: 5px;
padding: 10px 32px;
margin: 26px 5px 0 5px;
cursor: pointer; }
.sweet-alert button:focus {
outline: none;
box-shadow: 0 0 2px rgba(128, 179, 235, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05); }
.sweet-alert button:hover {
background-color: #a1d9f2; }
.sweet-alert button:active {
background-color: #81ccee; }
.sweet-alert button.cancel {
background-color: #D0D0D0; }
.sweet-alert button.cancel:hover {
background-color: #c8c8c8; }
.sweet-alert button.cancel:active {
background-color: #b6b6b6; }
.sweet-alert button.cancel:focus {
box-shadow: rgba(197, 205, 211, 0.8) 0px 0px 2px, rgba(0, 0, 0,...
JavaScript
$('document').ready(function() {
swal({
title: "Aggiornamento profilo",
text: '<br /><form method="post" id="taxcode-update" name="taxcodeUpdate"><input id="admin-tax-code" minlength="3" class="form-control wedding-input-text wizard-input-pad" type="text" name="taxCode" placeholder="Codice fiscale"></form>',
type: "warning",
showCancelButton: false,
confirmButtonText: "Aggiorna il mio profilo",
closeOnConfirm: false
}, function(){
swal("Deleted!", "Your imaginary file has been deleted.", "success");
});
});
(function(g, f) {
function y(a, b, c) {
function e(a) {
var b = a || g.event;
a = b.target || b.srcElement;
b = b.relatedTarget;
if (q(l, "visible")) {
var c = -1;
if (null !== b) {
for (var d = 0; d < n.length; d++)
if (b === n[d]) {
c = d;
break
} - 1 === c && a.focus()
} else r = a
}
}
if (void 0 === a) return g.console.error("sweetAlert expects at least 1 attribute!"), !1;
var d = z({}, k);
switch (typeof a) {
case "string":
d.title = a;
d.text = b || "";
d.type = c || "";
break;
case "object":
if (void 0 === a.title) return g.console.error('Missing "title" argument!'), !1;
d.title = a.title;
d.text = a.text || k.text;
d.type = a.type || k.type;
d.customClass = a.customClass || d.customClass;
d.allowOutsideClick = a.allowOutsideClick ||...