JSFiddle - React, Tailwind, and code Playground

by Chintan Upadhayay

CSS

/* Outer */
.sh-modal {
    width:100%;
    height:100%;
    display:none;
    position:fixed;
    top:0px;
    left:0px;
    background:rgba(0,0,0,0.75);
}
 
/* Inner */
.sh-modal-container {
    max-width:700px;
    max-height: 500px;
    width:100%;
    padding:40px;
    position:absolute;
    top:25%;
    left:50%;
    -webkit-transform:translate(-50%, -50%);
    transform:translate(-50%, -50%);
    box-shadow:0px 2px 6px rgba(0,0,0,1);
    border-radius:3px;
    background:#fff;
}
 
/* Close Button */
.sh-modal-close {
    cursor: pointer;
    background: transparent;
    border: 0;
    -webkit-appearance: none;
    display: block;
    outline: none;
    padding: 5px;
    z-index: 500;
    box-shadow: none;
    touch-action: manipulation;
    float: right;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    position: absolute;
    top: 5px;
    right: 5px;
}