markteekman / accessible-astro-components

A set of Accessible, easy to use, Front-end UI Components for Astro.

Home Page:https://accessible-astro.netlify.app/accessible-components/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modal: Property 'closeModal' does not exist

mrcnski opened this issue · comments

Thanks for the useful resource! I noticed that astro check throws the following error:

src/components/Modal.astro:216:10 - error ts(2339): Property 'closeModal' does not exist on type 'Window & typeof globalThis'.

216   window.closeModal = closeModal
             ~~~~~~~~~~

I believe it should simply be window.close. See also https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close.

Hey @mrcnski! Thanks for submitting the issue and providing a plausible solution, I really appreciate it 😊 I'll implement a fix when I've got the time for it!

@mrcnski I apologize that this is taking so long, I've been preoccupied with other projects. I'll try and look into it next week! 🙂

Thanks for the update and no worries! I just copied the component into my own project and fixed it there.

Resolved in #81, thanks @mrcnski! 😄