Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Edsardio committed Apr 15, 2022
1 parent 55ec263 commit f93173c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/module.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ __export(exports, {
function src_default(Alpine) {
document.addEventListener("alpine:init", () => {
let body = document.querySelector("body");
body.innerHTML = `<div style="display: none;" x-bind:class="$store.lightbox.show ? '' : 'hidden'" class="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-show="$store.lightbox.show" x-data>
body.insertAdjacentHTML("afterbegin", `<div style="display: none;" x-bind:class="$store.lightbox.show ? '' : 'hidden'" class="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-show="$store.lightbox.show" x-data>
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div x-on:click="$store.lightbox.toggle()" class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"
x-transition:enter="ease-out duration-300"
Expand Down Expand Up @@ -46,7 +46,7 @@ function src_default(Alpine) {
</div>
</div>
</div>
` + body.innerHTML;
`);
Alpine.store("lightbox", {
show: false,
src: null,
Expand Down
4 changes: 2 additions & 2 deletions dist/module.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
function src_default(Alpine) {
document.addEventListener("alpine:init", () => {
let body = document.querySelector("body");
body.innerHTML = `<div style="display: none;" x-bind:class="$store.lightbox.show ? '' : 'hidden'" class="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-show="$store.lightbox.show" x-data>
body.insertAdjacentHTML("afterbegin", `<div style="display: none;" x-bind:class="$store.lightbox.show ? '' : 'hidden'" class="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-show="$store.lightbox.show" x-data>
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div x-on:click="$store.lightbox.toggle()" class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"
x-transition:enter="ease-out duration-300"
Expand Down Expand Up @@ -33,7 +33,7 @@ function src_default(Alpine) {
</div>
</div>
</div>
` + body.innerHTML;
`);
Alpine.store("lightbox", {
show: false,
src: null,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@edsardio/alpine-lightbox",
"version": "1.0.3",
"version": "1.0.4",
"description": "A dynamic lightbox using AlpineJS and TailwindCSS",
"main": "dist/module.cjs.js",
"module": "dist/module.esm.js",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default function (Alpine) {
document.addEventListener('alpine:init', () => {
let body = document.querySelector('body');
body.innerHTML = `<div style="display: none;" x-bind:class="$store.lightbox.show ? '' : 'hidden'" class="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-show="$store.lightbox.show" x-data>
body.insertAdjacentHTML('afterbegin', `<div style="display: none;" x-bind:class="$store.lightbox.show ? '' : 'hidden'" class="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-show="$store.lightbox.show" x-data>
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div x-on:click="$store.lightbox.toggle()" class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"
x-transition:enter="ease-out duration-300"
Expand Down Expand Up @@ -32,7 +32,7 @@ export default function (Alpine) {
</div>
</div>
</div>
` + body.innerHTML;
`);

Alpine.store('lightbox', {
show: false,
Expand Down

0 comments on commit f93173c

Please sign in to comment.