modal-background@0.1.0
code:script.js
import {html} from '../htm@3.0.4%2Fpreact/script.js';
export const Background = ({onClose}) => html<div class="background" onClick="${onClose}"/>;
export const CSS = `
.background {
position: fixed;
top: 0;
right: 0;
width: 100%;
height: 100%;
background-color: var(--modal-bg, rgba(0, 0, 0, 0.4));
z-index: 89999;
}
`;