JSFiddle - React, Tailwind, and code Playground

HTML

<a id="show-modal" href="javascript:;">Exibir Modal.</a>
<div class="notice">
  <h1>Atenção</h1>
  <p>
    Aqui você pode exibir algumas mensagens importantes, que ela irá sobrepor todo o conteudo do seu site.
  </p>
</div>
<div class="overlay"></div>

CSS

.notice {
  background: #fff;
  border: 1px solid #000;
  height: 130px;
  width: 380px;
  padding: 10px;
  position: fixed;
  top: 50%;
  left: 50%;
  margin: -75px 0 0 -200px;
  z-index: 1;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
}

.overlay,
.notice {
  display: none;
}

JavaScript

$('#show-modal').on('click', function() {
  $('.overlay, .notice').show();
});

$('.overlay').on('click', function() {
  $('.overlay, .notice').hide();
});