UNPKG

my-react-app-hakim10

Version:

A lightweight React modal component for displaying content in a modal overlay, with support for fade-in and fade-out animations.

32 lines (29 loc) 533 B
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 999; } .modal-content { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); max-width: 500px; width: 100%; transition: opacity 0.3s ease-in-out; } .close-button { color: white; background: black; border: none; font-size: 18px; cursor: pointer; float: right; }