UNPKG

modale_npm_lib

Version:

A simple react component library for the hrnet project (OpenClassrooms)

2 lines (1 loc) 1.11 kB
import e from"react";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}(".full-screen{background-color:rgba(0,0,0,.48);height:100%;left:0;position:fixed;top:0;width:100%;z-index:999}.modale{background-color:#fff;border-radius:8px;margin:0 24%;padding:32px 48px;position:relative;text-align:center;top:50%;transform:translateY(-50%)}.round-button{position:absolute;right:-24px;top:-24px}.full-screen[data-display=false]{display:none}.full-screen[data-display=true]{display:initial}");var t=function(t){var n=t.title,a=t.description,l=t.displayed,i=t.onClick;return e.createElement("div",{className:"full-screen","data-display":l},e.createElement("div",{className:"modale"},e.createElement("h1",null,n),e.createElement("p",null,a),e.createElement("button",{onClick:null!=i?i:void 0},"OK")))};export{t as Modal};