Thursday, 4 July 2019

React Alert Popup (SweetAlert)

NPM: npm install sweetalert --save CDN: <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> import swal from 'sweetalert'; const handleSignout = (e) => {     e.preventDefault();     swal({         title: '',         text: '',         icon: '',         dangerMode: true,         buttons: {             cancel: 'Cancel',             ok: 'OK'         }     }).then((result) => {         if (result) {             // actions         }     }); }; reference: https://github.com/t4t5/sweetalert

No comments:

SQL: Generate a range of numbers

SELECT ones.n + 10*tens.n + 100*hundreds.n + 1000*thousands.n FROM       (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) ones(n),      (VALU...