# Feedback-dialog ## Examples ### Default ```html { const openDialog = () => { const dialog = document.querySelector("m-feedback-dialog"); if (dialog) { (dialog as any).open = true; } }; const handleClose = () => { const dialog = document.querySelector("m-feedback-dialog"); if (dialog) { (dialog as any).open = false; } }; const handleSubmit = async (e: CustomEvent<{ formData: { [key: string]: any } }>) => { const dialog = document.querySelector("m-feedback-dialog"); if (dialog) { (dialog as any).loading = true; await new Promise((resolve) => setTimeout(resolve, 2000)); (dialog as any).loading = false; (dialog as any).submitted = true; console.log(e.detail); } }; return html` Open Default Feedback Dialog `; } ``` ### CustomOptions ```html { const openDialog = () => { const dialog = document.querySelector("#dialog-custom-options"); if (dialog) { (dialog as any).open = true; } }; const handleClose = () => { const dialog = document.querySelector("#dialog-custom-options"); if (dialog) { (dialog as any).open = false; } }; const handleSubmit = async (e: CustomEvent<{ formData: { [key: string]: any } }>) => { const dialog = document.querySelector("#dialog-custom-options"); if (dialog) { (dialog as any).loading = true; await new Promise((resolve) => setTimeout(resolve, 2000)); (dialog as any).loading = false; (dialog as any).submitted = true; console.log(e.detail); } }; return html` Open Feedback Dialog With Custom Options `; } ```