JSFiddle - React, Tailwind, and code Playground

by stantz16

HTML

<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">
<!-- 
  Bootstrap docs: https://getbootstrap.com/docs
-->


<div class="container">
  
  <div class="mx-auto mt-4">
    
    <h2 class="font-weight-bold mb-0">Modal Trigger</h2>
    <p class="text-muted">It can be used to notify your users that they are about to delete something. 
    <br>
    Imagine if a user accidentally clicks Delete on his profile and đź’¨ he/she is no more. That would keep you up at night, i assure you!
    </p>
    
    <h4 class="font-weight-bold mb-0">Good Practice</h4>
    <p>Always halt your delete forms with javascript with 
      <pre class='bg-dark text-white pl-2 w-50'>event.preventDefault();</pre> 
    Then decide exactly what happens when the user clicks <stong>Delete Me</stong>
    </p>
  
    <a type="submit" id="btn-delete" data-toggle="modal" data-target="#deleteModal" class="btn btn-danger text-white font-weight-bold">
      Delete Modal Trigger
    </a>
    
    <p class='mt-3'>
      <a class='text-primary' href="https://sudorealm.com/" target="_blank">
      Watch the tutorial on <strong>Sudorealm.com</strong>
      </a>
    </p>
  </div>
  

  <div class="modal fade" id="deleteModal" 
  tabindex="-1" role="dialog" 
  aria-labelledby="deleteModalLabel" 
  aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header d-flex justify-content-center align-content-center py-5 bg-red-secondary">
          <div class="text-center mt-4 w-100">
            <i width="50px" height="50px"...

CSS

.row {
  background: #f8f9fa;
  margin-top: 20px;
}

.col {
  border: solid 1px #6c757d;
  padding: 10px;
}

button:active, button:focus {
  outline: 0;
  border: none;
  -moz-outline-style: none;
}

.bg-red-secondary{
    background:hsla(0, 100%, 72.9%, 0.1);
}
.gg-danger {
    box-sizing: border-box;
    position: relative;
    display: block;
    transform: scale(var(--ggs,2)) !important;
    width: 20px;
    height: 20px;
    border: 2px solid;
    border-radius: 40px
}
.gg-danger::after,
.gg-danger::before {
    content: "";
    display: block;
    box-sizing: border-box;
    position: absolute;
    border-radius: 3px;
    width: 2px;
    background: currentColor;
    left: 7px
}
.gg-danger::after {
    top: 2px;
    height: 8px
}
.gg-danger::before {
    height: 2px;
    bottom: 2px
}