mirror of
https://github.com/multipleofnpm/qtmodal.git
synced 2026-01-14 00:27:57 +00:00
Introduce a basic modal implementation with QTModal
This commit is contained in:
11
index.js
11
index.js
@@ -1 +1,12 @@
|
||||
import { $ } from 'https://cdn.jsdelivr.net/npm/qthtml';
|
||||
|
||||
var QTModal = {
|
||||
html: `
|
||||
<div id="qtmodal" style="position:fixed; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.5);">
|
||||
<div style="position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); padding:20px; background:#fff;">
|
||||
Loading...
|
||||
</div>
|
||||
</div>`,
|
||||
show: () => $(`body`).inject(QTModal.html),
|
||||
hide: () => $('#qtmodal')?.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user