JSFiddle - React, Tailwind, and code Playground

by limon

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/sweetalert2@7.11.0/dist/sweetalert2.all.js"></script>
<div class="container-fluid">

  <div class="modal fade" id="MyModal">
    <div class="modal-dialog modal-lg" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">Bootstrap 4 + SweetAlert2 example</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span></button>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-primary btn-lg" onclick="swal('Hi from SweetAlert2')">Open SweetAlert2</button>
        </div>
      </div>
    </div>
  </div>


  <div class="row">
    <h1>Bootstrap 4 + SweetAlert2 example</h1>
    <p class="text-center"><a class="btn btn-lg btn-info" href="#MyModal" data-toggle="modal">Open the Bootstrap 4 modal</a></p>
  </div>
</div>