We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benefits:
Read more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog
The text was updated successfully, but these errors were encountered:
The approach I found valuable
Each component gets its own modals, and
dialog { padding: 0; border: none; outline: none; background-color: transparent; }
.SomeComponent { &-modal { padding: 2rem; border-radius: 1rem; background-color: var(--theme-bg-alt); &::backdrop { backdrop-filter: blur(1rem); background-color: var(--black); } } }
const modalRef = useRef<HTMLDialogElement>(null);
<dialog ref={modalRef} ... >
function handleModalClick(event: MouseEvent<HTMLDialogElement>) { if (event.target === event.currentTarget) { event.currentTarget.close(); } }
<dialog onClick={handleModalClick} ... >
function handleSomethingClicked() { modalRef.current?.showModal(); }
There are two options for what to do from here
Sorry, something went wrong.
No branches or pull requests
Benefits:
Read more:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog
The text was updated successfully, but these errors were encountered: